From 7579222bb049a71c114e44e42f815037a681537f Mon Sep 17 00:00:00 2001 From: dpschen Date: Sun, 26 Sep 2021 14:49:06 +0000 Subject: [PATCH] feat: add example configuration for vscode with volor (#791) Co-authored-by: Dominik Pschenitschni Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/791 Co-authored-by: dpschen Co-committed-by: dpschen --- .vscode.example/extensions.json | 12 ++++++++++++ .vscode.example/settings.json | 30 +++++++++++++++++++++++++++++ package.json | 1 + tsconfig.json | 8 +++++++- yarn.lock | 34 +++++++++++++++++++++++++++++++++ 5 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 .vscode.example/extensions.json create mode 100644 .vscode.example/settings.json diff --git a/.vscode.example/extensions.json b/.vscode.example/extensions.json new file mode 100644 index 00000000..6b2cee9f --- /dev/null +++ b/.vscode.example/extensions.json @@ -0,0 +1,12 @@ +{ + "recommendations": [ + "codezombiech.gitignore", + "dbaeumer.vscode-eslint", + "editorconfig.editorconfig", + "johnsoncodehk.volar", + "lokalise.i18n-ally", + "mgmcdermott.vscode-language-babel", + "mikestead.dotenv", + "Syler.sass-indented" + ] +} \ No newline at end of file diff --git a/.vscode.example/settings.json b/.vscode.example/settings.json new file mode 100644 index 00000000..110c8221 --- /dev/null +++ b/.vscode.example/settings.json @@ -0,0 +1,30 @@ +{ + "eslint.packageManager": "yarn", + "editor.formatOnSave": false, + "editor.codeActionsOnSave": { + "source.fixAll": true + }, + "eslint.format.enable": true, + "[javascript]": { + "editor.defaultFormatter": "dbaeumer.vscode-eslint" + }, + "[typescript]": { + "editor.defaultFormatter": "dbaeumer.vscode-eslint" + }, + + // https://eslint.vuejs.org/user-guide/#editor-integrations + "eslint.validate": [ + "javascript", + "javascriptreact", + "vue" + ], + "vetur.validation.template": false, + + // i18n ally + "i18n-ally.localesPaths": [ + "src/i18n/lang" + ], + "i18n-ally.sortKeys": true, + "i18n-ally.keepFulfilled": true, + "i18n-ally.keystyle": "nested", +} \ No newline at end of file diff --git a/package.json b/package.json index 66a3ec88..bd5beec1 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "@typescript-eslint/parser": "4.31.2", "@vue/babel-preset-app": "4.5.13", "@vue/eslint-config-typescript": "7.0.0", + "@vue/runtime-dom": "latest", "autoprefixer": "10.3.6", "axios": "0.21.4", "babel-eslint": "10.1.0", diff --git a/tsconfig.json b/tsconfig.json index b2de102a..4e9b15a7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -36,7 +36,13 @@ "include": [ "src/**/*.ts", "src/**/*.tsx", + "src/**/*.vue", "tests/**/*.ts", "tests/**/*.tsx" - ] + ], + + // https://github.com/johnsoncodehk/volar#using + "vueCompilerOptions": { + "experimentalCompatMode": 2 + }, } diff --git a/yarn.lock b/yarn.lock index 47ec5244..131cf39a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1768,6 +1768,35 @@ dependencies: vue-eslint-parser "^7.0.0" +"@vue/reactivity@3.2.19": + version "3.2.19" + resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.2.19.tgz#fc6e0f0106f295226835cfed5ff5f84d927bea65" + integrity sha512-FtachoYs2SnyrWup5UikP54xDX6ZJ1s5VgHcJp4rkGoutU3Ry61jhs+nCX7J64zjX992Mh9gGUC0LqTs8q9vCA== + dependencies: + "@vue/shared" "3.2.19" + +"@vue/runtime-core@3.2.19": + version "3.2.19" + resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.2.19.tgz#807715b7f4728abb84fa4a8efdbe37d8ddb4c6d3" + integrity sha512-qArZSWKxWsgKfxk9BelZ32nY0MZ31CAW2kUUyVJyxh4cTfHaXGbjiQB5JgsvKc49ROMNffv9t3/qjasQqAH+RQ== + dependencies: + "@vue/reactivity" "3.2.19" + "@vue/shared" "3.2.19" + +"@vue/runtime-dom@latest": + version "3.2.19" + resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.2.19.tgz#7e8bf645754703e360fa132e4be9113edf2377bb" + integrity sha512-hIRboxXwafeHhbZEkZYNV0MiJXPNf4fP0X6hM2TJb0vssz8BKhD9cF92BkRgZztTQevecbhk0gu4uAPJ3dxL9A== + dependencies: + "@vue/runtime-core" "3.2.19" + "@vue/shared" "3.2.19" + csstype "^2.6.8" + +"@vue/shared@3.2.19": + version "3.2.19" + resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.2.19.tgz#111ec3da18337d86274446984c49925b1b2b2dd7" + integrity sha512-Knqhx7WieLdVgwCAZgTVrDCXZ50uItuecLh9JdLC8O+a5ayaSyIQYveUK3hCRNC7ws5zalHmZwfdLMGaS8r4Ew== + abab@^2.0.3, abab@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a" @@ -3174,6 +3203,11 @@ cssstyle@^2.3.0: dependencies: cssom "~0.3.6" +csstype@^2.6.8: + version "2.6.18" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.18.tgz#980a8b53085f34af313410af064f2bd241784218" + integrity sha512-RSU6Hyeg14am3Ah4VZEmeX8H7kLwEEirXe6aU2IPfKNvhXwTflK5HQRDNI0ypQXoqmm+QPyG2IaPuQE5zMwSIQ== + custom-event-polyfill@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/custom-event-polyfill/-/custom-event-polyfill-1.0.7.tgz#9bc993ddda937c1a30ccd335614c6c58c4f87aee"