Last active
March 12, 2019 12:40
-
-
Save Jayphen/77fa13e60305ce6a830c9bed79b00ff9 to your computer and use it in GitHub Desktop.
ESlint/autosave VSCode settings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"prettier.eslintIntegration": true, | |
"editor.formatOnSave": true, | |
"eslint.enable": true, | |
"eslint.validate": [ | |
"javascript", | |
"javascriptreact", | |
{ "language": "typescript", "autoFix": true }, | |
{ "language": "typescriptreact", "autoFix": true } | |
], | |
} |
I have removed autofix on save on Dan's recommendation, but if you want fixable eslint warnings to be fixed on save, add this:
"[javascript]": {
"editor.formatOnSave": false
},
"[javascriptreact]": {
"editor.formatOnSave": false
},
"[typescript]": {
"editor.formatOnSave": false
},
"[typescriptreact]": {
"editor.formatOnSave": false
},
"eslint.autoFixOnSave": true,
It's probably better to manually fix errors so that you learn from them, rather than having them magically fixed for you.
The "autoFix": true
for TS in the eslint.validate
rules is still necessary in order to get the little lightbulb to show up in VSCode.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Work great! 👍 Thanks!