-
-
Save sathish-spidie/999118ba64e0b4e5ba36bd35630264c0 to your computer and use it in GitHub Desktop.
Add Prettier & ESLint to VS Code with a Create React App
This file contains 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
{ | |
"extends": ["react-app", "plugin:prettier/recommended"] | |
} |
This file contains 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
{ | |
"scripts": { | |
"precommit": "pretty-quick --staged" | |
}, | |
"devDependencies": { | |
"eslint-config-prettier": "^2.9.0", | |
"eslint-plugin-prettier": "^2.6.0", | |
"prettier": "^1.11.1", | |
"pretty-quick": "^1.4.1" | |
} | |
} |
This file contains 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
{ | |
"editor.formatOnSave": true, | |
"[javascript]": { | |
"editor.formatOnSave": false | |
}, | |
"eslint.autoFixOnSave": true, | |
"eslint.alwaysShowStatus": true, | |
"prettier.disableLanguages": [ | |
"js" | |
], | |
"files.autoSave": "onFocusChange", | |
// It fixes some wired {" "} stufs in code. | |
"eslint.validate": [ | |
"javascript", | |
"javascriptreact", | |
{ "language": "typescript", "autoFix": true }, | |
{ "language": "typescriptreact", "autoFix": true } | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment