-
Notifications
You must be signed in to change notification settings - Fork 126
/
.eslintrc
54 lines (54 loc) · 1.9 KB
/
.eslintrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{
"env": {
"browser": true,
"node": true,
"es6": true,
"mocha": true
},
"parserOptions": {
"ecmaVersion": 2017,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"modules": true
}
},
"extends": [
"airbnb"
],
"plugins": [
"babel",
"mocha",
"react"
],
"rules": {
"babel/new-cap": 1,
"comma-dangle": ["error", "never"],
"complexity": ["warn", { "max": 7 }],
"generator-star-spacing": 1,
"id-length": ["error", { "exceptions": ["_", "x", "y", "z", "i", "e", "t"] }],
"import/no-named-as-default": 0, // connected/test-only components
"import/no-extraneous-dependencies": ["error", {"devDependencies": true}], // tests
"indent": ["error", 4, {"SwitchCase": 2}],
"max-len": [1, 120, 2, {"ignoreComments": true}],
"no-await-in-loop": 1,
"no-param-reassign": ["error", { "props": false }],
"no-plusplus": ["error", { "allowForLoopAfterthoughts": true }],
"no-underscore-dangle": "off",
"no-use-before-define": [2, "nofunc"],
"no-unused-vars": "warn",
"object-shorthand": 1,
"quotes": [2, "single", { "allowTemplateLiterals": true }],
"react/forbid-prop-types": [1, { "forbid": ["any"] }], // used in conjunction with the transform-react-remove-prop-types babel plugin
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
"react/jsx-indent": ["error", 4],
"react/jsx-indent-props": ["error", 4],
"react/jsx-uses-react": 2,
"react/jsx-uses-vars": 2,
"react/no-find-dom-node": "warn", // TODO: change this to error and fix findings
"react/prop-types": "error",
"react/react-in-jsx-scope": 2,
"strict": [2, "never"],
"vars-on-top": "error"
}
}