-
Notifications
You must be signed in to change notification settings - Fork 23
/
.eslintrc
192 lines (173 loc) · 6.28 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
{
"root": true,
"parser": "babel-eslint",
"plugins": [
"flowtype"
],
"env": {
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"rules": {
/* Possible Errors */
"no-await-in-loop": "error",
"no-empty": ["error", { "allowEmptyCatch": true }],
"no-prototype-builtins": "error",
"no-template-curly-in-string": "error",
"no-unsafe-negation": "error",
/* Best Practices */
"accessor-pairs": "error",
"array-callback-return": "error",
"block-scoped-var": "error",
"consistent-return": "error",
"curly": ["error", "all"],
"dot-location": ["error", "property"],
"dot-notation": ["error", { "allowPattern": "^[a-z]+(_[a-z]+)+$" }],
"eqeqeq": "error",
"guard-for-in": "error",
"no-alert": "error",
"no-caller": "error",
"no-empty-function": "error",
"no-eval": "error",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-floating-decimal": "error",
"no-global-assign": "error",
"no-implied-eval": "error",
"no-iterator": "error",
"no-labels": "error",
"no-lone-blocks": "error",
"no-loop-func": "error",
"no-multi-spaces": "error",
"no-multi-str": "error",
"no-new-func": "error",
"no-new-wrappers": "error",
"no-new": "error",
"no-octal-escape": "error",
"no-proto": "error",
"no-return-assign": "error",
"no-return-await": "error",
"no-script-url": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-throw-literal": "error",
"no-unmodified-loop-condition": "error",
"no-unused-expressions": "error",
"no-useless-call": "error",
"no-useless-concat": "error",
"no-useless-escape": "error",
"no-useless-return": "error",
"no-void": "error",
"no-warning-comments": "error",
"no-with": "error",
"radix": ["error", "as-needed"],
"require-await": "error",
"wrap-iife": "error",
"yoda": ["error", "never"],
/* Variables */
"no-shadow-restricted-names": "error",
"no-shadow": "error",
"no-undef-init": "error",
"no-use-before-define": "error",
/* Node.js and CommonJS */
"global-require": "error",
"handle-callback-err": "error",
"no-path-concat": "error",
"no-process-env": "error",
"no-sync": "error",
/* Stylistic Issues */
"array-bracket-spacing": ["error", "never", {
"arraysInArrays": true,
}],
"block-spacing": "error",
"brace-style": ["error", "stroustrup", { "allowSingleLine": true }],
"camelcase": ["error", { "properties": "always" }],
"comma-dangle": ["error", "always-multiline"],
"comma-spacing": ["error", { "after": true, "before": false }],
"comma-style": ["error", "last"],
"computed-property-spacing": "error",
"consistent-this": ["error", "self"],
"eol-last": "error",
"func-call-spacing": "error",
"func-name-matching": "error",
"func-names": ["error", "as-needed"],
"func-style": ["error", "expression"],
"id-length": ["error", {
"min": 3,
"exceptions": ["_", "fs", "cb", "i"],
}],
"indent": ["error", 2, { "SwitchCase": 1 }],
"key-spacing": ["error", { "beforeColon": false, "afterColon": true }],
"keyword-spacing": "error",
"linebreak-style": ["error", "unix"],
"lines-around-comment": ["error", { "beforeLineComment": true }],
"max-len": ["error", 80],
"max-lines": ["error", 1000],
"new-cap": "error",
"new-parens": "error",
"newline-after-var": ["error", "always"],
"newline-before-return": "error",
"no-array-constructor": "error",
"no-lonely-if": "error",
"no-mixed-spaces-and-tabs": "error",
"no-multiple-empty-lines": "error",
"no-nested-ternary": "error",
"no-new-object": "error",
"no-trailing-spaces": "error",
"no-unneeded-ternary": "error",
"no-whitespace-before-property": "error",
"object-curly-spacing": ["error", "always"],
"one-var": ["error", { "uninitialized": "always", "initialized": "never" }],
"operator-linebreak": "error",
"quote-props": ["error", "consistent-as-needed"],
"quotes": ["error", "single", { "avoidEscape": true }],
"semi": ["error", "always"],
"semi-spacing": ["error", { "before": false, "after": true }],
"space-before-blocks": ["error", "always"],
"space-before-function-paren": ["error", "never"],
"space-in-parens": ["error", "never"],
"space-infix-ops": "error",
"space-unary-ops": ["error", { "words": false, "nonwords": false }],
"spaced-comment": ["error", "always"],
/* ECMAScript 6 */
"arrow-body-style": ["error", "as-needed"],
"arrow-parens": "error",
"arrow-spacing": "error",
"generator-star-spacing": "error",
"no-confusing-arrow": ["error", { "allowParens": true }],
"no-useless-computed-key": "error",
"no-useless-constructor": "error",
"no-useless-rename": "error",
"no-var": "error",
"object-shorthand": "error",
"prefer-arrow-callback": "error",
"prefer-const": "error",
"prefer-numeric-literals": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-template": "error",
"rest-spread-spacing": "error",
"symbol-description": "error",
"template-curly-spacing": "error",
"yield-star-spacing": "error",
/* Flow */
"flowtype/boolean-style": ["error", "bool"],
"flowtype/define-flow-type": "error",
"flowtype/delimiter-dangle": ["error", "always-multiline"],
"flowtype/generic-spacing": ["error", "never"],
"flowtype/no-dupe-keys": "error",
"flowtype/no-primitive-constructor-types": "error",
"flowtype/no-weak-types": ["error", {"any": false}],
"flowtype/object-type-delimiter": ["error", "comma"],
"flowtype/require-parameter-type": ["error", { "excludeArrowFunctions": "expressionsOnly", "excludeParameterMatch": "^_" }],
"flowtype/require-return-type": ["error", "always", { "excludeArrowFunctions": "expressionsOnly" }],
"flowtype/require-valid-file-annotation": ["error", "always", {"annotationStyle": "block"}],
"flowtype/semi": "error",
"flowtype/space-after-type-colon": ["error", "always"],
"flowtype/space-before-generic-bracket": ["error", "never"],
"flowtype/space-before-type-colon": ["error", "never"],
"flowtype/union-intersection-spacing": ["error", "always"],
"flowtype/use-flow-type": "error",
}
}