-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc
193 lines (186 loc) · 6.51 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
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
{
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 7,
"sourceType": "module",
"impliedStrict": true,
"ecmaFeatures": {
"jsx": true,
"impliedStrict": true
}
},
"plugins": [
"react",
"babel"
],
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"globals": {
"document": true
},
"rules": {
"babel/generator-star-spacing": ["error", {"before": false, "after": true}],
"react/jsx-indent": ["error", 2],
"react/jsx-indent-props": ["error", 2],
"react/jsx-wrap-multilines": ["error"],
"react/jsx-space-before-closing": ["error", "always"],
"react/jsx-pascal-case": ["error"],
"react/jsx-no-target-blank": ["error"],
"react/jsx-no-comment-textnodes": ["error"],
"react/jsx-no-duplicate-props": ["error", {"ignoreCase": true}],
"react/jsx-no-bind": ["error", {
"ignoreRefs": false,
"allowArrowFunctions": true,
"allowBind": false
}],
"react/jsx-handler-names": ["error"],
"react/jsx-first-prop-new-line": ["error", "multiline"],
"react/jsx-equals-spacing": ["error", "never"],
"react/jsx-curly-spacing": [2, "never"],
"complexity": ["error", 5],
"curly": ["error", "all"],
"dot-location": ["error", "property"],
"dot-notation": "error",
"eqeqeq": "error",
"guard-for-in": "error",
"no-caller": "error",
"no-case-declarations": "error",
"no-else-return": "error",
"no-empty-function": "error",
"no-eq-null": "error",
"no-extra-bind": "error",
"no-floating-decimal": "error",
"no-implicit-coercion": "error",
"no-invalid-this": "error",
"no-lone-blocks": "error",
"no-loop-func": "error",
"no-magic-numbers": ["error", {"enforceConst": true, "ignore": [0, 1, -1]}],
"no-multi-spaces": "error",
"no-multi-str": "error",
"no-native-reassign": "error",
"no-new": "error",
"no-new-wrappers": "error",
"no-param-reassign": "error",
"no-redeclare": "error",
"no-return-assign": ["error", "always"],
"no-self-assign": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-throw-literal": "error",
"no-unmodified-loop-condition": "error",
// broken for `await null;` "no-unused-expressions": "error",
"no-useless-call": "error",
"no-useless-concat": "error",
"no-void": "error",
"no-warning-comments": "warn",
"no-with": "error",
"wrap-iife": ["error", "inside"],
"yoda": "error",
"init-declarations": ["error", "always"],
"no-shadow": "error",
"no-shadow-restricted-names": "error",
"no-undef": "error",
"no-undef-init": "error",
"no-unused-vars": "error",
"no-use-before-define": "error",
"callback-return": ["error", ["callback", "cb", "next"]],
"handle-callback-err": "error",
"no-path-concat": "error",
"no-process-env": "error",
"array-bracket-spacing": ["error", "never"],
"block-spacing": ["error", "always"],
"brace-style": ["error", "1tbs", { "allowSingleLine": false }],
"camelcase": ["error", {"properties": "always"}],
"comma-spacing": ["error", {"before": false, "after": true}],
"comma-style": ["error", "last"],
"comma-dangle": ["error", "never"],
"computed-property-spacing": ["error", "never"],
"consistent-this": ["error", "self"],
"eol-last": "error",
"func-style": ["error", "declaration", {
"allowArrowFunctions": true
}],
"id-length": ["error", {
"min": 2, "max": 40,
"properties": "always",
"exceptions": ["x", "y", "_"]
}],
"indent": ["error", 2, {"MemberExpression": 1}],
"key-spacing": "error",
"keyword-spacing": "error",
"linebreak-style": ["error", "unix"],
"max-depth": ["error", 4],
"max-len": ["error", 80, 4, {"ignoreUrls": false}],
"max-nested-callbacks": ["error", 1],
"max-params": ["error", 4],
"max-statements": ["error", 10, {"ignoreTopLevelFunctions": false}],
"new-cap": "error",
"new-parens": "error",
//"newline-after-var": ["error", "always"],
"newline-per-chained-call": ["error", {"ignoreChainWithDepth": 2}],
"no-array-constructor": "error",
"no-bitwise": "off",
"no-continue": "error",
"no-inline-comments": "error",
"no-lonely-if": "error",
"no-mixed-spaces-and-tabs": "error",
"no-multiple-empty-lines": ["error", {"max": 2}],
"no-negated-condition": "error",
"no-nested-ternary": "error",
"no-new-object": "error",
"no-plusplus": "error",
//"no-restricted-syntax": ["error", "FunctionExpression", "WithStatement"],
"no-spaced-func": "error",
"no-trailing-spaces": ["error", { "skipBlankLines": true }],
"no-underscore-dangle": ["error"],
"no-unneeded-ternary": "error",
"no-whitespace-before-property": "error",
"object-curly-spacing": ["error", "never"],
//conflicts with ()=> ({...\n...}) "object-curly-newline": ["error", {"multiline": true}],
"one-var": ["error", "never"],
"one-var-declaration-per-line": ["error", "always"],
"operator-assignment": ["error", "always"],
"quote-props": ["error", "as-needed", {"numbers": true}],
"quotes": ["error", "single", "avoid-escape"],
"semi": ["error", "always"],
"semi-spacing": "error",
"sort-vars": "error",
"space-before-blocks": "error",
"space-before-function-paren": ["error", {
"anonymous": "never",
"named": "never"
}],
"space-in-parens": ["error", "never"],
"space-infix-ops": "error",
"space-unary-ops": "error",
"spaced-comment": ["error", "always"],
"wrap-regex": "error",
"arrow-body-style": ["error", "as-needed"],
//broken because of `async ()=>` "arrow-parens": ["error", "always"],
"arrow-spacing": ["error", { "before": false, "after": true }],
"constructor-super": "error",
//"generator-star-spacing": ["error", {"before": false, "after": true}],
"no-class-assign": "error",
//"no-confusing-arrow": ["error", {"allowParens": false}],
"no-const-assign": "error",
"no-dupe-class-members": "error",
"no-new-symbol": "error",
"no-this-before-super": "error",
"no-useless-constructor": "error",
"no-var": "error",
"object-shorthand": ["error", "always"],
"prefer-arrow-callback": "error",
"prefer-const": ["error", {
"destructuring": "all",
"ignoreReadBeforeAssign": false
}],
"prefer-reflect": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-template": "error",
"require-yield": "error",
"yield-star-spacing": ["error", {"before": true, "after": true}],
}
}