|
1 | 1 | { |
2 | | - "npm.packageManager": "pnpm", |
3 | | - "editor.defaultFormatter": "esbenp.prettier-vscode", |
4 | | - "[typescript]": { |
5 | | - "editor.defaultFormatter": "esbenp.prettier-vscode", |
6 | | - "editor.formatOnSave": true, |
7 | | - "editor.codeActionsOnSave": { |
8 | | - "source.fixAll.eslint": "explicit" |
9 | | - } |
| 2 | + "editor.tabSize": 2, |
| 3 | + // Disable the default formatter, use eslint instead |
| 4 | + "prettier.enable": false, |
| 5 | + // Auto fix |
| 6 | + "editor.formatOnSave": true, |
| 7 | + "editor.defaultFormatter": "dbaeumer.vscode-eslint", |
| 8 | + "editor.codeActionsOnSave": { |
| 9 | + "source.organizeImports": "never", |
| 10 | + "source.fixAll.eslint": "always", |
| 11 | + "source.removeUnusedImports": "always" |
10 | 12 | }, |
| 13 | + "eslint.enable": true, |
| 14 | + "eslint.probe": [ |
| 15 | + "astro", |
| 16 | + "javascript", |
| 17 | + "javascriptreact", |
| 18 | + "typescript", |
| 19 | + "typescriptreact", |
| 20 | + "html", |
| 21 | + "mdx", |
| 22 | + "vue", |
| 23 | + "markdown", |
| 24 | + "json", |
| 25 | + "jsonc" |
| 26 | + ], |
| 27 | + "typescript.validate.enable": true, |
| 28 | + "javascript.validate.enable": true, |
11 | 29 | "[typescriptreact]": { |
12 | | - "editor.defaultFormatter": "esbenp.prettier-vscode", |
13 | | - "editor.formatOnSave": true, |
14 | | - "editor.codeActionsOnSave": { |
15 | | - "source.fixAll.eslint": "explicit" |
16 | | - } |
| 30 | + "editor.defaultFormatter": "dbaeumer.vscode-eslint" |
| 31 | + }, |
| 32 | + "[typescript]": { |
| 33 | + "editor.defaultFormatter": "dbaeumer.vscode-eslint" |
| 34 | + }, |
| 35 | + "[javascriptreact]": { |
| 36 | + "editor.defaultFormatter": "dbaeumer.vscode-eslint" |
17 | 37 | }, |
18 | 38 | "[javascript]": { |
19 | | - "editor.defaultFormatter": "esbenp.prettier-vscode", |
20 | | - "editor.formatOnSave": true, |
21 | | - "editor.codeActionsOnSave": { |
22 | | - "source.fixAll.eslint": "explicit" |
23 | | - } |
| 39 | + "editor.defaultFormatter": "vscode.typescript-language-features" |
24 | 40 | }, |
25 | 41 | "[json]": { |
26 | | - "editor.defaultFormatter": "esbenp.prettier-vscode", |
27 | | - "editor.formatOnSave": true |
| 42 | + "editor.quickSuggestions": { |
| 43 | + "strings": true |
| 44 | + }, |
| 45 | + "editor.defaultFormatter": "vscode.json-language-features" |
28 | 46 | }, |
| 47 | + // Silent the stylistic rules in your IDE, but still auto fix them |
| 48 | + "eslint.rules.customizations": [ |
| 49 | + { |
| 50 | + "rule": "style/*", |
| 51 | + "severity": "off", |
| 52 | + "fixable": true |
| 53 | + }, |
| 54 | + { |
| 55 | + "rule": "format/*", |
| 56 | + "severity": "off", |
| 57 | + "fixable": true |
| 58 | + }, |
| 59 | + { |
| 60 | + "rule": "*-indent", |
| 61 | + "severity": "off", |
| 62 | + "fixable": true |
| 63 | + }, |
| 64 | + { |
| 65 | + "rule": "*-spacing", |
| 66 | + "severity": "off", |
| 67 | + "fixable": true |
| 68 | + }, |
| 69 | + { |
| 70 | + "rule": "*-spaces", |
| 71 | + "severity": "off", |
| 72 | + "fixable": true |
| 73 | + }, |
| 74 | + { |
| 75 | + "rule": "*-order", |
| 76 | + "severity": "off", |
| 77 | + "fixable": true |
| 78 | + }, |
| 79 | + { |
| 80 | + "rule": "*-dangle", |
| 81 | + "severity": "off", |
| 82 | + "fixable": true |
| 83 | + }, |
| 84 | + { |
| 85 | + "rule": "*-newline", |
| 86 | + "severity": "off", |
| 87 | + "fixable": true |
| 88 | + }, |
| 89 | + { |
| 90 | + "rule": "*quotes", |
| 91 | + "severity": "off", |
| 92 | + "fixable": true |
| 93 | + }, |
| 94 | + { |
| 95 | + "rule": "*semi", |
| 96 | + "severity": "off", |
| 97 | + "fixable": true |
| 98 | + } |
| 99 | + ], |
| 100 | + // Enable eslint for all supported languages |
| 101 | + "eslint.validate": [ |
| 102 | + "javascript", |
| 103 | + "javascriptreact", |
| 104 | + "typescript", |
| 105 | + "typescriptreact", |
| 106 | + "vue", |
| 107 | + "html", |
| 108 | + "markdown", |
| 109 | + "json", |
| 110 | + "jsonc", |
| 111 | + "yaml", |
| 112 | + "toml", |
| 113 | + "xml", |
| 114 | + "gql", |
| 115 | + "graphql", |
| 116 | + "astro", |
| 117 | + "svelte", |
| 118 | + "css", |
| 119 | + "less", |
| 120 | + "scss", |
| 121 | + "pcss", |
| 122 | + "postcss" |
| 123 | + ], |
29 | 124 | "[jsonc]": { |
30 | | - "editor.defaultFormatter": "esbenp.prettier-vscode", |
31 | | - "editor.formatOnSave": true |
| 125 | + "editor.defaultFormatter": "vscode.json-language-features" |
32 | 126 | }, |
33 | | - "editor.formatOnSaveMode": "file", |
34 | | - "typescript.tsdk": "node_modules/typescript/lib", |
35 | | - "[javascript][typescript][typescriptreact]": { |
36 | | - "editor.codeActionsOnSave": { |
37 | | - "source.fixAll.eslint": "explicit" |
38 | | - } |
39 | | - } |
40 | 127 | } |
0 commit comments