Last active
November 15, 2022 17:04
-
-
Save iannbing/472b9b5837ced3191cef7d94cd339971 to your computer and use it in GitHub Desktop.
A gist for initial eslint and prettier setup for React projects
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
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": ["eslint:recommended", "plugin:react/recommended", "airbnb"], | |
"env": { | |
"es6": true, | |
"jest": true, | |
"browser": true | |
}, | |
"parserOptions": { | |
"ecmaVersion": 6, | |
"sourceType": "module", | |
"ecmaFeatures": { | |
"jsx": true, | |
"impliedStrict": true, | |
"experimentalObjectRestSpread": true | |
} | |
}, | |
"plugins": [ | |
"react", | |
"prettier" | |
], | |
"rules": { | |
"react/jsx-indent": [1, 4], | |
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }] | |
} | |
} |
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
{ | |
"parser": "babylon", | |
"tabWidth": 4, | |
"semi": true, | |
"singleQuote": true, | |
"bracketSpacing": false, | |
"requirePragma": true, | |
"insertPragma": true, | |
"printWidth": 80 | |
} |
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
{ | |
"devDependencies": { | |
"eslint": "^4.17.0", | |
"eslint-config-airbnb": "^16.1.0", | |
"eslint-plugin-import": "^2.8.0", | |
"eslint-plugin-jsx-a11y": "^6.0.3", | |
"eslint-plugin-prettier": "^2.6.0", | |
"eslint-plugin-react": "^7.6.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment