-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4a1b10a
commit 1181b29
Showing
6 changed files
with
4,305 additions
and
7,923 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,45 @@ | ||
{ | ||
// Enable the ESlint flat config support | ||
"eslint.experimental.useFlatConfig": true, | ||
|
||
// Disable the default formatter, use eslint instead | ||
"prettier.enable": false, | ||
"editor.formatOnSave": false, | ||
|
||
// Auto fix | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit" | ||
}, | ||
"[vue]": { | ||
"editor.defaultFormatter": "dbaeumer.vscode-eslint" | ||
}, | ||
"[js]": { | ||
"editor.defaultFormatter": "dbaeumer.vscode-eslint" | ||
}, | ||
"[ts]": { | ||
"editor.defaultFormatter": "dbaeumer.vscode-eslint" | ||
}, | ||
"[typescript]": { | ||
"editor.defaultFormatter": "dbaeumer.vscode-eslint" | ||
"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", | ||
"vue" | ||
"typescriptreact", | ||
"vue", | ||
"html", | ||
"markdown", | ||
"json", | ||
"jsonc", | ||
"yaml", | ||
"toml", | ||
"gql", | ||
"graphql" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import antfu from '@antfu/eslint-config' | ||
|
||
const ignores = [ | ||
'.nuxt', | ||
'**/.nuxt/**', | ||
'.output', | ||
'**/.output/**', | ||
'node_modules', | ||
'**/node_modules/**', | ||
'public', | ||
'**/public/**', | ||
] | ||
|
||
export default antfu({ | ||
// .eslintignore is no longer supported in Flat config, use ignores instead | ||
ignores, | ||
|
||
// Stylistic formatting rules | ||
stylistic: { | ||
indent: 2, | ||
quotes: 'single', | ||
}, | ||
|
||
// TypeScript and Vue are auto-detected, you can also explicitly enable them | ||
typescript: true, | ||
vue: true, | ||
|
||
// Disable jsonc and yaml support | ||
jsonc: false, | ||
yaml: false, | ||
|
||
// Overwrite certain rules to your preference | ||
rules: { | ||
'no-console': ['error', { | ||
allow: ['info', 'warn', 'trace', 'error', 'group', 'groupEnd'], | ||
}], | ||
'style/comma-dangle': 'off', | ||
'curly': ['error', 'all'], | ||
'node/prefer-global/process': ['error', 'always'], | ||
}, | ||
}) |
Oops, something went wrong.