|
1 | 1 | { |
2 | | - // Disable the default formatter, use eslint instead |
| 2 | + // Use Oxc for formatting on supported files |
3 | 3 | "prettier.enable": false, |
4 | 4 | "editor.formatOnSave": false, |
5 | 5 |
|
6 | | - // Auto fix |
7 | | - "editor.codeActionsOnSave": { |
8 | | - "source.fixAll.eslint": "explicit", |
9 | | - "source.organizeImports": "never" |
| 6 | + "[javascript]": { |
| 7 | + "editor.defaultFormatter": "oxc.oxc-vscode", |
| 8 | + "editor.formatOnSave": true |
| 9 | + }, |
| 10 | + "[javascriptreact]": { |
| 11 | + "editor.defaultFormatter": "oxc.oxc-vscode", |
| 12 | + "editor.formatOnSave": true |
| 13 | + }, |
| 14 | + "[typescript]": { |
| 15 | + "editor.defaultFormatter": "oxc.oxc-vscode", |
| 16 | + "editor.formatOnSave": true |
| 17 | + }, |
| 18 | + "[typescriptreact]": { |
| 19 | + "editor.defaultFormatter": "oxc.oxc-vscode", |
| 20 | + "editor.formatOnSave": true |
| 21 | + }, |
| 22 | + "[json]": { |
| 23 | + "editor.defaultFormatter": "oxc.oxc-vscode", |
| 24 | + "editor.formatOnSave": true |
| 25 | + }, |
| 26 | + "[jsonc]": { |
| 27 | + "editor.defaultFormatter": "oxc.oxc-vscode", |
| 28 | + "editor.formatOnSave": true |
| 29 | + }, |
| 30 | + "[markdown]": { |
| 31 | + "editor.defaultFormatter": "oxc.oxc-vscode", |
| 32 | + "editor.formatOnSave": true |
| 33 | + }, |
| 34 | + "[yaml]": { |
| 35 | + "editor.defaultFormatter": "oxc.oxc-vscode", |
| 36 | + "editor.formatOnSave": true |
10 | 37 | }, |
11 | 38 |
|
12 | | - // Silent the stylistic rules in you IDE, but still auto fix them |
13 | | - "eslint.rules.customizations": [ |
14 | | - { "rule": "style/*", "severity": "off", "fixable": true }, |
15 | | - { "rule": "format/*", "severity": "off", "fixable": true }, |
16 | | - { "rule": "*-indent", "severity": "off", "fixable": true }, |
17 | | - { "rule": "*-spacing", "severity": "off", "fixable": true }, |
18 | | - { "rule": "*-spaces", "severity": "off", "fixable": true }, |
19 | | - { "rule": "*-order", "severity": "off", "fixable": true }, |
20 | | - { "rule": "*-dangle", "severity": "off", "fixable": true }, |
21 | | - { "rule": "*-newline", "severity": "off", "fixable": true }, |
22 | | - { "rule": "*quotes", "severity": "off", "fixable": true }, |
23 | | - { "rule": "*semi", "severity": "off", "fixable": true } |
24 | | - ], |
25 | | - |
26 | | - // Enable eslint for all supported languages |
27 | | - "eslint.validate": [ |
28 | | - "javascript", |
29 | | - "javascriptreact", |
30 | | - "typescript", |
31 | | - "typescriptreact", |
32 | | - "vue", |
33 | | - "html", |
34 | | - "markdown", |
35 | | - "json", |
36 | | - "jsonc", |
37 | | - "yaml", |
38 | | - "toml", |
39 | | - "xml", |
40 | | - "gql", |
41 | | - "graphql", |
42 | | - "astro", |
43 | | - "svelte", |
44 | | - "css", |
45 | | - "less", |
46 | | - "scss", |
47 | | - "pcss", |
48 | | - "postcss" |
49 | | - ] |
| 39 | + // Auto fix lint issues on save |
| 40 | + "editor.codeActionsOnSave": { |
| 41 | + "source.fixAll.oxc": "always", |
| 42 | + "source.organizeImports": "never" |
| 43 | + } |
50 | 44 | } |
0 commit comments