Skip to content

Commit 060a4b8

Browse files
committed
OCPBUGS-33487: Fix eslint and vscode fighting
See prettier/prettier-vscode#315 (comment) `esbenp.prettier-vscode` and `dbaeumer.vscode-eslint` appear to fight with each other regarding preferred indentation. Prettier, configured by `editor.formatOnSave`, produces the wrong formatting according to our eslint rules. Meanwhile eslint, configured by `source.fixAll.eslint`, produces the correct formatting.
1 parent 5e60fe1 commit 060a4b8

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

frontend/.vscode/settings.json

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,39 @@
11
{
22
"editor.defaultFormatter": "esbenp.prettier-vscode",
33
"[javascript]": {
4-
"editor.formatOnSave": true,
4+
"editor.formatOnSave": false,
55
"editor.codeActionsOnSave": {
66
"source.organizeImports": "never",
7-
"source.sortImports": "never"
7+
"source.sortImports": "never",
8+
"source.fixAll.eslint": "explicit",
9+
"source.fixAll.ts": "explicit"
810
}
911
},
1012
"[javascriptreact]": {
11-
"editor.formatOnSave": true,
13+
"editor.formatOnSave": false,
1214
"editor.codeActionsOnSave": {
1315
"source.organizeImports": "never",
14-
"source.sortImports": "never"
16+
"source.sortImports": "never",
17+
"source.fixAll.eslint": "explicit",
18+
"source.fixAll.ts": "explicit"
1519
}
1620
},
1721
"[typescript]": {
18-
"editor.formatOnSave": true,
22+
"editor.formatOnSave": false,
1923
"editor.codeActionsOnSave": {
2024
"source.organizeImports": "never",
21-
"source.sortImports": "never"
25+
"source.sortImports": "never",
26+
"source.fixAll.eslint": "explicit",
27+
"source.fixAll.ts": "explicit"
2228
}
2329
},
2430
"[typescriptreact]": {
25-
"editor.formatOnSave": true,
31+
"editor.formatOnSave": false,
2632
"editor.codeActionsOnSave": {
2733
"source.organizeImports": "never",
28-
"source.sortImports": "never"
34+
"source.sortImports": "never",
35+
"source.fixAll.eslint": "explicit",
36+
"source.fixAll.ts": "explicit"
2937
}
3038
},
3139
"[json]": {

0 commit comments

Comments
 (0)