|
1 | 1 | { |
| 2 | + // Enable the ESlint flat config support |
| 3 | + "eslint.experimental.useFlatConfig": true, |
| 4 | + |
| 5 | + // Disable the default formatter, use eslint instead |
2 | 6 | "prettier.enable": false, |
3 | 7 | "editor.formatOnSave": false, |
| 8 | + |
| 9 | + // Auto fix |
4 | 10 | "editor.codeActionsOnSave": { |
5 | | - "source.fixAll.eslint": true, |
6 | | - "source.organizeImports": false |
| 11 | + "source.fixAll.eslint": "explicit", |
| 12 | + "source.organizeImports": "never" |
7 | 13 | }, |
8 | 14 |
|
9 | | - // The following is optional. |
10 | | - // It's better to put under project setting `.vscode/settings.json` |
11 | | - // to avoid conflicts with working with different eslint configs |
12 | | - // that does not support all formats. |
| 15 | + // Silent the stylistic rules in you IDE, but still auto fix them |
| 16 | + "eslint.rules.customizations": [ |
| 17 | + { "rule": "style/*", "severity": "off" }, |
| 18 | + { "rule": "prettier/*", "severity": "off" }, |
| 19 | + { "rule": "*-indent", "severity": "off" }, |
| 20 | + { "rule": "*-spacing", "severity": "off" }, |
| 21 | + { "rule": "*-spaces", "severity": "off" }, |
| 22 | + { "rule": "*-order", "severity": "off" }, |
| 23 | + { "rule": "*-dangle", "severity": "off" }, |
| 24 | + { "rule": "*-newline", "severity": "off" }, |
| 25 | + { "rule": "*quotes", "severity": "off" }, |
| 26 | + { "rule": "*semi", "severity": "off" } |
| 27 | + ], |
| 28 | + |
| 29 | + // Enable eslint for all supported languages |
13 | 30 | "eslint.validate": [ |
14 | 31 | "javascript", |
15 | 32 | "javascriptreact", |
|
0 commit comments