-
-
Save ChinaShrimp/4399c45d7bc8e8c9f8601dc37dd81191 to your computer and use it in GitHub Desktop.
A gist for initial eslint and prettier setup for React projects
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
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
{ | |
"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, 2], | |
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }] | |
} | |
} |
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
{ | |
"parser": "babel", | |
"tabWidth": 2, | |
"semi": true, | |
"singleQuote": true, | |
"bracketSpacing": false, | |
"requirePragma": true, | |
"insertPragma": true, | |
"printWidth": 80 | |
} |
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
{ | |
"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", | |
"prettier": "^1.19.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment