Created
March 15, 2018 11:37
-
-
Save ZibanPirate/c8044c3bc3df5e16e9a18322a35a83d5 to your computer and use it in GitHub Desktop.
eslint.rc for React
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
module.exports = { | |
"root": true, | |
"extends": ["eslint:recommended", "plugin:react/recommended"], | |
"env": { | |
"browser": true, | |
"commonjs": true, | |
"es6": true, | |
}, | |
"parserOptions": { | |
"ecmaFeatures": { | |
"jsx": true | |
}, | |
"sourceType": "module" | |
}, | |
"plugins": [ | |
"react" | |
], | |
"rules": { | |
"comma-dangle": ["error", "always-multiline"], | |
"comma-spacing": ["error", { "before": false, "after": true }], | |
"eol-last": ["error", "always"], | |
"indent": ["error", 2, { "MemberExpression": 1 }], | |
"no-multiple-empty-lines": ["error"], | |
"no-new-symbol": "error", | |
"no-trailing-spaces": ["error"], | |
"no-undef": ["error"], | |
"no-unused-vars": ["error"], | |
"object-curly-spacing": ["error", "always"], | |
"object-shorthand": "error", | |
"prefer-const": 2, | |
"quotes": ["error", "single"], | |
"semi": ["error", "never"], | |
"space-in-parens": ["error", "never"], | |
"strict": [2, "never"] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment