Last active
August 14, 2024 18:18
-
-
Save sarahcssiqueira/ffc1d67f6213d958593049e8915cb8ff to your computer and use it in GitHub Desktop.
Eslint, Prettier and VS Code settings for a React app project
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
/node_modules | |
/build |
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
{ | |
"env": { | |
"browser": true, | |
"es2021": true, | |
"node": true | |
}, | |
"extends": [ | |
"eslint:recommended", | |
"plugin:react/recommended", | |
"plugin:react-hooks/recommended", | |
"plugin:prettier/recommended" | |
], | |
"parserOptions": { | |
"ecmaVersion": 12, | |
"sourceType": "module", | |
"ecmaFeatures": { | |
"jsx": true | |
} | |
}, | |
"settings": { | |
"react": { | |
"version": "detect" | |
} | |
}, | |
"plugins": [ | |
"react", | |
"react-hooks" | |
], | |
"rules": { | |
"indent": ["error", "tab"], | |
"no-unused-vars": ["error", { "vars": "all", "args": "after-used", "ignoreRestSiblings": false }], | |
"prettier/prettier": ["error", {}, { "usePrettierrc": true }] | |
} | |
} |
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
/node_modules | |
/build |
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
{ | |
"arrowParens": "always", | |
"bracketSpacing": true, | |
"htmlWhitespaceSensitivity": "css", | |
"insertPragma": false, | |
"jsxSingleQuote": true, | |
"quoteProps": "as-needed", | |
"requirePragma": false, | |
"semi": true, | |
"singleQuote": true, | |
"trailingComma": "none", | |
"useTabs": true, | |
"printWidth": 140, | |
"tabWidth": 2, | |
"rangeStart": 0 | |
} |
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
{ | |
"editor.tabSize": 4, | |
"editor.detectIndentation": false, | |
"[javascript]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode", | |
"editor.formatOnSave": true, | |
}, | |
"[json]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode", | |
"editor.formatOnSave": true | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment