Add eslint
This commit is contained in:
parent
3cd2062ebf
commit
d32ee5ac36
10 changed files with 585 additions and 85 deletions
37
.eslintrc.js
Normal file
37
.eslintrc.js
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
module.exports = {
|
||||
"parser": "babel-eslint",
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es6": true
|
||||
},
|
||||
"extends": "eslint:recommended",
|
||||
"parserOptions": {
|
||||
"ecmaFeatures": {
|
||||
"experimentalObjectRestSpread": true,
|
||||
"jsx": true
|
||||
},
|
||||
"sourceType": "module"
|
||||
},
|
||||
"plugins": [
|
||||
"react", "flowtype"
|
||||
],
|
||||
"rules": {
|
||||
"indent": ["error", 2],
|
||||
"linebreak-style": ["error", "unix"],
|
||||
"quotes": ["error","double"],
|
||||
"semi": ["error","always"],
|
||||
"no-unused-vars": ["error", { "varsIgnorePattern": "^_", "argsIgnorePattern": "^_" }],
|
||||
|
||||
"react/jsx-uses-react": 2,
|
||||
"react/jsx-uses-vars": 2,
|
||||
"react/react-in-jsx-scope": "error",
|
||||
|
||||
"flowtype/define-flow-type": 2,
|
||||
"flowtype/boolean-style": "error",
|
||||
"flowtype/generic-spacing": ["error", "never"],
|
||||
"flowtype/no-dupe-keys": "error",
|
||||
"flowtype/union-intersection-spacing": ["error", "always"],
|
||||
"flowtype/no-weak-types": "warn",
|
||||
"flowtype/require-variable-type": "warn"
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue