From 0160c134c2e56a77d4619c97147d1462b301163f Mon Sep 17 00:00:00 2001 From: Alexey Date: Mon, 29 May 2023 04:41:21 +0400 Subject: [PATCH] Chore/prettier (#1708) * chore: add prettier * chore: format code * chore: remove eslint ts integration * chore: update webpack.config * chore: add vs code configs --- .gitignore | 3 -- .vscode/launch.json | 88 +++++++++++++++++++++++++++++++++++++++++ .vscode/settings.json | 40 +++++++++++++++++++ .vscode/tasks.json | 92 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 220 insertions(+), 3 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json create mode 100644 .vscode/tasks.json diff --git a/.gitignore b/.gitignore index b9a73c9fa1..3524245593 100644 --- a/.gitignore +++ b/.gitignore @@ -16,9 +16,6 @@ *.ear *.rar -# editor files -.vscode - # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000000..2b626ca0d4 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,88 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "type": "chrome", + "request": "launch", + "name": "Debug CE", + "url": "http://127.0.0.1:3100", + "webRoot": "${workspaceFolder}/webapp/packages/product-default", + }, + { + "type": "java", + "name": "CloudBeaver CE", + "request": "launch", + "mainClass": "org.eclipse.equinox.launcher.Main", + "cwd": "${env:DBEAVER_DEVEL_ECLIPSE_PATH}/opt/cbce", + "windows": { + "type": "java", + "name": "CloudBeaver CE", + "request": "launch", + "mainClass": "org.eclipse.equinox.launcher.Main", + "classPaths": [ + "${env:DBEAVER_DEVEL_ECLIPSE_PATH}/plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar" + ], + "args": [ + "-product", + "io.cloudbeaver.product.ce.product", + "-configuration", + "file:${env:DBEAVER_DEVEL_ECLIPSE_WORKSPACE_PATH}/.metadata/.plugins/org.eclipse.pde.core/CloudbeaverServer.product/", + "-dev", + "file:${env:DBEAVER_DEVEL_ECLIPSE_WORKSPACE_PATH}/.metadata/.plugins/org.eclipse.pde.core/CloudbeaverServer.product/dev.properties", + "-os", + "win32", + "-ws", + "win32", + "-arch", + "x86_64", + "-nl", + "en", + "-showsplash", + "-web-config", + "conf/cloudbeaver.conf" + ], + "vmArgs": [ + "-XX:+IgnoreUnrecognizedVMOptions", + "--add-modules=ALL-SYSTEM", + "-Xms64m", + "-Xmx1024m", + "-Declipse.pde.launch=true" + ] + }, + "osx": { + "type": "java", + "name": "CloudBeaver CE", + "request": "launch", + "mainClass": "org.eclipse.equinox.launcher.Main", + "classPaths": [ + "${env:DBEAVER_DEVEL_ECLIPSE_PATH}/plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar" + ], + "args": [ + "-product", + "io.cloudbeaver.product.ce.product", + "-configuration", + "file:${env:DBEAVER_DEVEL_ECLIPSE_WORKSPACE_PATH}/.metadata/.plugins/org.eclipse.pde.core/CloudbeaverServer.product/", + "-dev", + "file:${env:DBEAVER_DEVEL_ECLIPSE_WORKSPACE_PATH}/.metadata/.plugins/org.eclipse.pde.core/CloudbeaverServer.product/dev.properties", + "-os", + "macosx", + "-ws", + "cocoa", + "-arch", + "aarch64", + "-nl", + "en_US", + "-showsplash" + ], + "vmArgs": [ + "-XX:+IgnoreUnrecognizedVMOptions", + "--add-modules=ALL-SYSTEM", + "-Xms64m", + "-Xmx1024m", + "-Declipse.pde.launch=true", + "-XstartOnFirstThread" + ] + } + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..a85cece84a --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,40 @@ +{ + "editor.tabSize": 2, + "editor.formatOnSave": true, + + "task.autoDetect": "off", + + "typescript.preferences.importModuleSpecifier": "relative", + "typescript.preferences.includePackageJsonAutoImports": "on", + "typescript.preferences.quoteStyle": "single", + "typescript.tsdk": "webapp/node_modules/typescript/lib", + + "eslint.enable": true, + "eslint.validate": [ + "javascript", + "javascriptreact", + "typescript", + "typescriptreact" + ], + "eslint.packageManager": "yarn", + "eslint.workingDirectories": ["webapp"], + + "editor.defaultFormatter": "esbenp.prettier-vscode", + "[javascript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[javascriptreact]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[typescript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[typescriptreact]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + + "files.eol": "\n", + "files.associations": { + "*.css": "postcss" + } +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000000..3ed45291cf --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,92 @@ +{ + "version": "2.0.0", + "options": { + "env": { + "cwd": "${workspaceFolder}/webapp", + "NODE_OPTIONS": "--max-old-space-size=8192" + } + }, + "tasks": [ + { + "label": "Run Tests", + "type": "shell", + "command": "yarn", + "group": "test", + "args": [ + "lerna", + "run", + "test", + "--no-bail", + "--stream", + "--" + ], + "problemMatcher": [], + "presentation": { + "clear": true + } + }, + { + "label": "DevServer", + "type": "shell", + "command": "yarn", + "args": [ + "dev", + "--", + "--env", + "server=${input:stage.ce}", + "--host", + "0.0.0.0" + ], + "problemMatcher": [], + "options": { + "cwd": "${workspaceFolder}/webapp/packages/product-default" + }, + "presentation": { + "clear": true + } + }, + { + "label": "Yarn Install", + "type": "shell", + "command": "yarn", + "args": [], + "problemMatcher": [], + "presentation": { + "clear": true + } + }, + { + "label": "Lerna Bootstrap", + "type": "shell", + "command": "yarn", + "args": [ + "lerna", + "bootstrap" + ], + "problemMatcher": [], + "presentation": { + "clear": true + } + }, + { + "label": "Bootstrap", + "dependsOrder": "sequence", + "dependsOn": [ + "Yarn Install", + "Lerna Bootstrap" + ], + "problemMatcher": [] + } + ], + "inputs": [ + { + "type": "pickString", + "id": "stage.ce", + "description": "CE Stage servers", + "default": "http://127.0.0.1:8978/", + "options": [ + "http://127.0.0.1:8978/", + ] + } + ] +} \ No newline at end of file