Created
August 11, 2017 19:03
-
-
Save cheung31/3b10ab25fd108c0b4988cba6f87a7cd2 to your computer and use it in GitHub Desktop.
Sane/Strict .eslintrc for React applications
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": "airbnb", | |
"env": { | |
"browser": true, | |
"amd": true, | |
"commonjs": true, | |
"jest": true, | |
"mocha": true, | |
"node": true, | |
"es6": true | |
}, | |
"parserOptions": { | |
"ecmaFeatures": { | |
"experimentalObjectRestSpread": true, | |
"jsx": true | |
}, | |
"sourceType": "module" | |
}, | |
"plugins": [ | |
"react" | |
], | |
"rules": { | |
"indent": ["error", 4], | |
"array-callback-return": "warn", | |
"consistent-return": "off", | |
"max-len": "warn", | |
"no-console": "off", | |
"no-param-reassign": "warn", | |
"no-plusplus": "off", | |
"no-process-env": "off", | |
"no-shadow": "warn", | |
"no-use-before-define": "warn", | |
"react/forbid-prop-types": "warn", | |
"react/jsx-indent": ["error", 4], | |
"react/jsx-indent-props": ["error", 4], | |
"react/jsx-filename-extension": ["error", { "extensions": [".jsx", ".js"] }], | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment