Skip to content

Commit

Permalink
docs: update config, close antfu#273
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Oct 7, 2023
1 parent a5c439c commit 4422fb9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
16 changes: 6 additions & 10 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
{
// Enable the flat config support
// Enable the ESlint flat config support
"eslint.experimental.useFlatConfig": true,

// Disable the default formatter
// Disable the default formatter, use eslint instead
"prettier.enable": false,
"editor.formatOnSave": false,

// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.organizeImports": false
"source.fixAll": "explicit",
"source.organizeImports": "never"
},

// Silent the stylistic rules in you IDE, but still auto fix them
"eslint.rules.customizations": [
{ "rule": "@stylistic/*", "severity": "off" },
{ "rule": "style*", "severity": "off" },
{ "rule": "style/*", "severity": "off" },
{ "rule": "*-indent", "severity": "off" },
{ "rule": "*-spacing", "severity": "off" },
{ "rule": "*-spaces", "severity": "off" },
Expand All @@ -26,10 +25,7 @@
{ "rule": "*semi", "severity": "off" }
],

// The following is optional.
// It's better to put under project setting `.vscode/settings.json`
// to avoid conflicts with working with different eslint configs
// that does not support all formats.
// Enable eslint for all supported languages
"eslint.validate": [
"javascript",
"javascriptreact",
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ Add the following settings to your `.vscode/settings.json`:

// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.organizeImports": false
"source.fixAll": "explicit",
"source.organizeImports": "never"
},

// Silent the stylistic rules in you IDE, but still auto fix them
Expand Down

0 comments on commit 4422fb9

Please sign in to comment.