diff --git a/.gitignore b/.gitignore index de01c07..6b9716c 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ dist-ssr # Editor directories and files .vscode/* +!.vscode/settings.json !.vscode/extensions.json .idea .DS_Store @@ -26,4 +27,4 @@ stats.html docs/.vitepress/dist/ docs/.vitepress/cache/ docs/.vitepress/.temp/ -docs/components.d.ts \ No newline at end of file +docs/components.d.ts diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..62190d4 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,54 @@ +{ + // Enable the ESlint flat config support + "eslint.useFlatConfig": true, + "eslint.format.enable": true, + + // Disable the default formatter, use eslint instead + "prettier.enable": false, + "editor.formatOnSave": false, + + // Auto fix + "editor.codeActionsOnSave": { + "source.fixAll.eslint": "explicit", + "source.organizeImports": "never" + }, + + // Silent the stylistic rules in you IDE, but still auto fix them + "eslint.rules.customizations": [ + { "rule": "style/*", "severity": "off" }, + { "rule": "format/*", "severity": "off" }, + { "rule": "*-indent", "severity": "off" }, + { "rule": "*-spacing", "severity": "off" }, + { "rule": "*-spaces", "severity": "off" }, + { "rule": "*-order", "severity": "off" }, + { "rule": "*-dangle", "severity": "off" }, + { "rule": "*-newline", "severity": "off" }, + { "rule": "*quotes", "severity": "off" }, + { "rule": "*semi", "severity": "off" } + ], + + // Enable eslint for all supported languages + "eslint.validate": [ + "javascript", + "javascriptreact", + "typescript", + "typescriptreact", + "vue", + "html", + "markdown", + "json", + "jsonc", + "yaml", + "toml", + "yml" + ], + + // Default formatter configuration + "editor.defaultFormatter": "dbaeumer.vscode-eslint", + "[jsonc]": { + "editor.defaultFormatter": "dbaeumer.vscode-eslint" + }, + "[vue]": { + "editor.defaultFormatter": "dbaeumer.vscode-eslint" + } +}