This repository has been archived by the owner on Feb 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: lint with
@antfu/eslint-config
but format with Prettier
- Loading branch information
1 parent
81db415
commit 4fc7385
Showing
5 changed files
with
1,203 additions
and
1,246 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,8 +1,28 @@ | ||
{ | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": true | ||
}, | ||
// Enable ESLint flat config support | ||
"eslint.experimental.useFlatConfig": true, | ||
|
||
// Use Pretter as the default formatter | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true, | ||
"eslint.validate": ["javascript", "javascriptreact", "vue"] | ||
|
||
// Auto-fix ESLint errors on save | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit", | ||
"source.organizeImports": "never" | ||
}, | ||
|
||
// Enable ESLint for all supported languages | ||
"eslint.validate": [ | ||
"javascript", | ||
"javascriptreact", | ||
"typescript", | ||
"typescriptreact", | ||
"vue", | ||
"html", | ||
"markdown", | ||
"json", | ||
"jsonc", | ||
"yaml" | ||
] | ||
} |
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,23 @@ | ||
import antfu from '@antfu/eslint-config' | ||
import unocss from '@unocss/eslint-config/flat' | ||
|
||
export default [ | ||
unocss, | ||
...(await antfu( | ||
{ | ||
stylistic: false, | ||
ignores: ['tsconfig.json'], | ||
}, | ||
{ | ||
rules: { | ||
'node/prefer-global/buffer': 'off', | ||
'node/prefer-global/process': 'off', | ||
// Ignore rules clashing with Prettier | ||
'vue/html-closing-bracket-newline': 'off', | ||
'vue/html-indent': 'off', | ||
'vue/html-self-closing': 'off', | ||
'vue/singleline-html-element-content-newline': 'off', | ||
}, | ||
}, | ||
)), | ||
] |
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
Oops, something went wrong.