Skip to content

Commit

Permalink
chore(config): register VsCode settings (#143)
Browse files Browse the repository at this point in the history
### Description

- Use configs from @alvarosabu
- Set default formater to `Eslint`

Co-authored-by: Alvaro Saburido <[email protected]>
  • Loading branch information
Neosoulink and alvarosabu authored Oct 27, 2024
1 parent c22623a commit 80b2e7e
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ dist-ssr

# Editor directories and files
.vscode/*
!.vscode/settings.json
!.vscode/extensions.json
.idea
.DS_Store
Expand All @@ -26,4 +27,4 @@ stats.html
docs/.vitepress/dist/
docs/.vitepress/cache/
docs/.vitepress/.temp/
docs/components.d.ts
docs/components.d.ts
54 changes: 54 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -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"
}
}

0 comments on commit 80b2e7e

Please sign in to comment.