1 | module.exports = {
|
2 | rules: {
|
3 | "callback-return": "off",
|
4 | "global-require": "off",
|
5 | "handle-callback-err": "off",
|
6 | "max-classes-per-file": ["error", 1],
|
7 | "max-lines-per-function": "off",
|
8 | "no-async-promise-executor": "error",
|
9 | "no-buffer-constructor": "error",
|
10 | "no-fallthrough": "error",
|
11 | "no-irregular-whitespace": "error",
|
12 | "no-misleading-character-class": "error",
|
13 | "no-mixed-requires": "off",
|
14 | "no-new-require": "error",
|
15 | "no-path-concat": "error",
|
16 | "no-process-env": "off",
|
17 | "no-process-exit": "off",
|
18 | "no-restricted-modules": "off",
|
19 | "no-sync": "off",
|
20 | "no-useless-catch": "error",
|
21 | "prefer-object-spread": "error",
|
22 | "require-atomic-updates": "error",
|
23 | "require-unicode-regexp": "off",
|
24 | "for-direction": "off",
|
25 | "getter-return": "error",
|
26 | "no-await-in-loop": "off",
|
27 | "no-compare-neg-zero": "error",
|
28 | "no-cond-assign": "error",
|
29 | "no-console": "off",
|
30 | "no-constant-condition": "error",
|
31 | "no-control-regex": "error",
|
32 | "no-debugger": "error",
|
33 | "no-dupe-args": "error",
|
34 | "no-dupe-keys": "error",
|
35 | "no-duplicate-case": "error",
|
36 | "no-empty": "error",
|
37 | "no-empty-character-class": "error",
|
38 | "no-ex-assign": "error",
|
39 | "no-extra-boolean-cast": "error",
|
40 | "no-extra-parens": "off",
|
41 | "no-extra-semi": "error",
|
42 | "no-func-assign": "error",
|
43 | "no-inner-declarations": "error",
|
44 | "no-invalid-regexp": "error",
|
45 | "no-obj-calls": "error",
|
46 | "no-prototype-builtins": "error",
|
47 | "no-regex-spaces": "error",
|
48 | "no-sparse-arrays": "error",
|
49 | "no-template-curly-in-string": "warn",
|
50 | "no-unexpected-multiline": "error",
|
51 | "no-unreachable": "error",
|
52 | "no-unsafe-finally": "error",
|
53 | "no-unsafe-negation": "error",
|
54 | "use-isnan": "error",
|
55 | "valid-jsdoc": "off",
|
56 | "valid-typeof": "error",
|
57 | "accessor-pairs": "off",
|
58 | "array-callback-return": "error",
|
59 | "block-scoped-var": "off",
|
60 | "class-methods-use-this": "error",
|
61 | complexity: ["error", { max: 10 }],
|
62 | "consistent-return": "error",
|
63 | curly: ["error", "multi-or-nest"],
|
64 | "default-case": "off",
|
65 | "dot-location": ["error", "property"],
|
66 | "dot-notation": "error",
|
67 | eqeqeq: "error",
|
68 | "guard-for-in": "error",
|
69 | "no-alert": "error",
|
70 | "no-caller": "error",
|
71 | "no-case-declarations": "error",
|
72 | "no-div-regex": "error",
|
73 | "no-else-return": "error",
|
74 | "no-empty-function": "error",
|
75 | "no-empty-pattern": "error",
|
76 | "no-eq-null": "error",
|
77 | "no-eval": "error",
|
78 | "no-extend-native": "error",
|
79 | "no-extra-bind": "error",
|
80 | "no-extra-label": "error",
|
81 | "no-floating-decimal": "error",
|
82 | "no-global-assign": "error",
|
83 | "no-implicit-coercion": "error",
|
84 | "no-implicit-globals": "error",
|
85 | "no-implied-eval": "error",
|
86 | "no-invalid-this": "error",
|
87 | "no-iterator": "error",
|
88 | "no-labels": "error",
|
89 | "no-lone-blocks": "error",
|
90 | "no-loop-func": "error",
|
91 | "no-magic-numbers": "off",
|
92 | "no-multi-spaces": "error",
|
93 | "no-multi-str": "error",
|
94 | "no-new": "error",
|
95 | "no-new-func": "error",
|
96 | "no-new-wrappers": "error",
|
97 | "no-octal": "error",
|
98 | "no-octal-escape": "error",
|
99 | "no-param-reassign": "error",
|
100 | "no-proto": "error",
|
101 | "no-redeclare": "error",
|
102 | "no-restricted-properties": "off",
|
103 | "no-return-assign": "error",
|
104 | "no-return-await": "off",
|
105 | "no-script-url": "error",
|
106 | "no-self-assign": ["error", { props: false }],
|
107 | "no-self-compare": "error",
|
108 | "no-sequences": "error",
|
109 | "no-throw-literal": "error",
|
110 | "no-unmodified-loop-condition": "error",
|
111 | "no-unused-expressions": "error",
|
112 | "no-unused-labels": "error",
|
113 | "no-useless-call": "error",
|
114 | "no-useless-concat": "error",
|
115 | "no-useless-escape": "error",
|
116 | "no-useless-return": "error",
|
117 | "no-void": "error",
|
118 | "no-warning-comments": "warn",
|
119 | "no-with": "error",
|
120 | "prefer-promise-reject-errors": [
|
121 | "error",
|
122 | {
|
123 | allowEmptyReject: true,
|
124 | },
|
125 | ],
|
126 | radix: "error",
|
127 | "require-await": "off",
|
128 | "vars-on-top": "error",
|
129 | "wrap-iife": ["error", "outside"],
|
130 | yoda: ["error", "never", { exceptRange: true }],
|
131 | strict: "off",
|
132 | "init-declarations": "error",
|
133 | "no-catch-shadow": "error",
|
134 | "no-delete-var": "error",
|
135 | "no-label-var": "error",
|
136 | "no-restricted-globals": "off",
|
137 | "no-shadow": "error",
|
138 | "no-shadow-restricted-names": "error",
|
139 | "no-undef": "error",
|
140 | "no-undef-init": "error",
|
141 | "no-undefined": "off",
|
142 | "no-unused-vars": [
|
143 | "error",
|
144 | {
|
145 | vars: "all",
|
146 | args: "all",
|
147 | ignoreRestSiblings: true,
|
148 | argsIgnorePattern: "^_.*$",
|
149 | caughtErrors: "all",
|
150 | caughtErrorsIgnorePattern: "^_.*$",
|
151 | },
|
152 | ],
|
153 | "no-use-before-define": "error",
|
154 | "array-bracket-newline": ["error", { multiline: true }],
|
155 | "array-bracket-spacing": ["error", "never"],
|
156 | "array-element-newline": ["error", { multiline: true }],
|
157 | "block-spacing": ["error", "always"],
|
158 | "brace-style": ["error", "1tbs", { allowSingleLine: true }],
|
159 | camelcase: "off",
|
160 | "capitalized-comments": "off",
|
161 | "comma-dangle": ["error", "always-multiline"],
|
162 | "comma-spacing": ["error", { before: false, after: true }],
|
163 | "comma-style": ["error", "last"],
|
164 | "computed-property-spacing": ["error", "never"],
|
165 | "consistent-this": "off",
|
166 | "eol-last": ["error", "always"],
|
167 | "func-call-spacing": "off",
|
168 | "func-name-matching": "off",
|
169 | "func-names": "off",
|
170 | "func-style": ["error", "declaration", { allowArrowFunctions: true }],
|
171 | "function-paren-newline": ["error", "multiline"],
|
172 | "id-blacklist": "off",
|
173 | "id-length": "off",
|
174 | "id-match": "off",
|
175 | "implicit-arrow-linebreak": ["error", "beside"],
|
176 | indent: ["error", 2],
|
177 | "jsx-quotes": ["error", "prefer-double"],
|
178 | "key-spacing": [
|
179 | "error",
|
180 | { beforeColon: false, afterColon: true, mode: "strict" },
|
181 | ],
|
182 | "keyword-spacing": ["error", { before: true, after: true }],
|
183 | "line-comment-position": "off",
|
184 | "linebreak-style": ["error", "unix"],
|
185 | "lines-around-comment": [
|
186 | "error",
|
187 | {
|
188 | beforeBlockComment: true,
|
189 | afterBlockComment: false,
|
190 | beforeLineComment: true,
|
191 | afterLineComment: false,
|
192 | allowBlockStart: true,
|
193 | allowBlockEnd: true,
|
194 | allowObjectStart: true,
|
195 | allowObjectEnd: true,
|
196 | allowArrayStart: true,
|
197 | allowArrayEnd: true,
|
198 | allowClassStart: true,
|
199 | allowClassEnd: true,
|
200 | },
|
201 | ],
|
202 | "lines-between-class-members": ["error", "always"],
|
203 | "max-depth": ["error", { max: 4 }],
|
204 | "max-len": [
|
205 | "error",
|
206 | {
|
207 | code: 80,
|
208 | ignoreComments: true,
|
209 | ignoreTrailingComments: true,
|
210 | ignoreUrls: true,
|
211 | ignoreStrings: true,
|
212 | ignoreTemplateLiterals: true,
|
213 | ignoreRegExpLiterals: true,
|
214 | },
|
215 | ],
|
216 | "max-lines": "off",
|
217 | "max-nested-callbacks": ["error", { max: 3 }],
|
218 | "max-params": ["error", { max: 3 }],
|
219 | "max-statements": "off",
|
220 | "max-statements-per-line": ["error", { max: 2 }],
|
221 | "multiline-comment-style": ["error", "bare-block"],
|
222 | "multiline-ternary": ["error", "always-multiline"],
|
223 | "new-cap": "off",
|
224 | "new-parens": "error",
|
225 | "newline-per-chained-call": "off",
|
226 | "no-array-constructor": "error",
|
227 | "no-bitwise": [
|
228 | "error",
|
229 | {
|
230 | int32Hint: true,
|
231 | },
|
232 | ],
|
233 | "no-continue": "off",
|
234 | "no-inline-comments": "off",
|
235 | "no-lonely-if": "error",
|
236 | "no-mixed-operators": "off",
|
237 | "no-mixed-spaces-and-tabs": "error",
|
238 | "no-multi-assign": "error",
|
239 | "no-multiple-empty-lines": ["error", { max: 1 }],
|
240 | "no-negated-condition": "error",
|
241 | "no-nested-ternary": "off",
|
242 | "no-new-object": "error",
|
243 | "no-plusplus": [
|
244 | "error",
|
245 | {
|
246 | allowForLoopAfterthoughts: true,
|
247 | },
|
248 | ],
|
249 | "no-restricted-syntax": "off",
|
250 | "no-tabs": "error",
|
251 | "no-ternary": "off",
|
252 | "no-trailing-spaces": "error",
|
253 | "no-underscore-dangle": [
|
254 | "error",
|
255 | {
|
256 | allowAfterThis: true,
|
257 | allowAfterSuper: true,
|
258 | enforceInMethodNames: false,
|
259 | },
|
260 | ],
|
261 | "no-unneeded-ternary": "error",
|
262 | "no-whitespace-before-property": "error",
|
263 | "nonblock-statement-body-position": ["error", "below"],
|
264 | "object-curly-newline": ["error", { multiline: true }],
|
265 | "object-curly-spacing": ["error", "always"],
|
266 | "object-property-newline": [
|
267 | "error",
|
268 | { allowAllPropertiesOnSameLine: true },
|
269 | ],
|
270 | "one-var": ["error", { initialized: "never", uninitialized: "always" }],
|
271 | "one-var-declaration-per-line": "off",
|
272 | "operator-assignment": "error",
|
273 | "operator-linebreak": ["error", "before"],
|
274 | "padded-blocks": ["error", "never"],
|
275 | "padding-line-between-statements": "off",
|
276 | "quote-props": ["error", "as-needed"],
|
277 | quotes: ["error", "double"],
|
278 | semi: ["error", "always"],
|
279 | "semi-spacing": ["error", { before: false, after: true }],
|
280 | "semi-style": ["error", "last"],
|
281 | "sort-keys": "off",
|
282 | "sort-vars": "off",
|
283 | "space-before-blocks": ["error", "always"],
|
284 | "space-before-function-paren": ["error", "always"],
|
285 | "space-in-parens": ["error", "never"],
|
286 | "space-infix-ops": "error",
|
287 | "space-unary-ops": ["error", { words: true, nonwords: false }],
|
288 | "spaced-comment": "error",
|
289 | "switch-colon-spacing": ["error", { after: true, before: false }],
|
290 | "template-tag-spacing": ["error", "never"],
|
291 | "unicode-bom": ["error", "never"],
|
292 | "wrap-regex": "off",
|
293 | "arrow-body-style": ["error", "as-needed"],
|
294 | "arrow-parens": ["error", "as-needed"],
|
295 | "arrow-spacing": ["error", { before: true, after: true }],
|
296 | "constructor-super": "error",
|
297 | "generator-star-spacing": ["error", "after"],
|
298 | "no-class-assign": "error",
|
299 | "no-confusing-arrow": ["error", { allowParens: true }],
|
300 | "no-const-assign": "error",
|
301 | "no-dupe-class-members": "error",
|
302 | "no-duplicate-imports": "error",
|
303 | "no-new-symbol": "error",
|
304 | "no-restricted-imports": "off",
|
305 | "no-this-before-super": "error",
|
306 | "no-useless-computed-key": "error",
|
307 | "no-useless-constructor": "error",
|
308 | "no-useless-rename": "error",
|
309 | "no-var": "error",
|
310 | "object-shorthand": "error",
|
311 | "prefer-arrow-callback": ["error", { allowNamedFunctions: true }],
|
312 | "prefer-const": "error",
|
313 | "prefer-destructuring": ["error", { object: true, array: false }],
|
314 | "prefer-named-capture-group": "off",
|
315 | "prefer-numeric-literals": "error",
|
316 | "prefer-rest-params": "error",
|
317 | "prefer-spread": "error",
|
318 | "prefer-template": "error",
|
319 | "require-yield": "off",
|
320 | "rest-spread-spacing": ["error", "always"],
|
321 | "sort-imports": "off",
|
322 | "symbol-description": "error",
|
323 | "template-curly-spacing": ["error", "never"],
|
324 | "yield-star-spacing": ["error", "after"],
|
325 | "default-param-last": "error",
|
326 | "no-import-assign": "error",
|
327 | "prefer-regex-literals": "error",
|
328 | },
|
329 | };
|