-
Notifications
You must be signed in to change notification settings - Fork 78
/
.eslintrc.json
91 lines (85 loc) · 2.47 KB
/
.eslintrc.json
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
{
"parser": "babel-eslint",
"extends": "airbnb",
"env": {
"browser": true
},
"globals": {},
"rules": {
"jsx-a11y/label-has-for": [
2,
{
"components": ["Label"],
"required": {
"every": ["nesting", "id"]
},
"allowChildren": true
}
],
"jsx-a11y/label-has-associated-control": [
2,
{
"labelAttributes": ["label"],
"controlComponents": ["Input"],
"depth": 3
}
],
"jsx-a11y/click-events-have-key-events": "warn",
"jsx-a11y/anchor-is-valid": "warn",
"dot-location": [1, "property"],
"max-len": [
"error",
{
"code": 120,
"ignoreStrings": true,
"ignoreComments": true,
"tabWidth": 2,
"ignoreTemplateLiterals": true
}
],
"no-underscore-dangle": 0,
"no-return-assign": ["error", "except-parens"],
"key-spacing": 0,
"arrow-parens": [1, "always"],
"generator-star-spacing": ["error", "both"],
"no-confusing-arrow": ["error", { "allowParens": true }],
"no-param-reassign": ["error", { "props": false }],
"no-nested-ternary": ["warn"],
"func-names": ["error", "as-needed"],
"react/sort-comp": 0,
"react/jsx-filename-extension": [
"error",
{
"extensions": [".js", ".jsx"]
}
],
"react/destructuring-assignment": 0,
"no-use-before-define": ["error", "nofunc"],
"import/first": ["off"],
"jsx-a11y/no-static-element-interactions": 0,
"no-mixed-operators": ["error", { "allowSamePrecedence": true }],
"newline-per-chained-call": ["error"],
"react/no-access-state-in-setstate": "warn",
"react/prefer-stateless-function": ["warn"],
"react/no-unused-state": ["error"],
"import/no-named-as-default-member": ["warn"],
"prefer-arrow-callback": "off",
"prefer-destructuring": [
"warn",
{
"VariableDeclarator": {
"array": false,
"object": true
},
"AssignmentExpression": {
"array": true,
"object": false
}
}
],
"no-plusplus": ["error", { "allowForLoopAfterthoughts": true }],
"no-unused-expressions": ["error", { "allowTernary": true }],
"no-console": ["error", { "allow": ["error", "warn"] }]
},
"plugins": ["jsx-a11y", "react"]
}