|
1 | 1 | {
|
2 |
| - "plugins": [ |
3 |
| - "jsdoc", |
4 |
| - "lodash", |
5 |
| - "security" |
6 |
| - ], |
| 2 | + "plugins": ["jsdoc", "lodash", "security"], |
7 | 3 | "env": {
|
8 | 4 | "browser": false,
|
9 | 5 | "node": true,
|
|
15 | 11 | "pragma": "_"
|
16 | 12 | }
|
17 | 13 | },
|
| 14 | + "parserOptions": { |
| 15 | + "ecmaVersion": 2018 |
| 16 | + }, |
18 | 17 | "rules": {
|
19 | 18 | // Possible Errors
|
20 | 19 | "for-direction": "error",
|
|
25 | 24 | "no-await-in-loop": "error",
|
26 | 25 | "no-compare-neg-zero": "error",
|
27 | 26 | "no-cond-assign": "error",
|
28 |
| - "no-console": ["error", { |
29 |
| - "allow": ["info", "warn", "error"] |
30 |
| - }], |
| 27 | + "no-console": [ |
| 28 | + "error", |
| 29 | + { |
| 30 | + "allow": ["info", "warn", "error"] |
| 31 | + } |
| 32 | + ], |
31 | 33 | "no-constant-condition": "error",
|
32 | 34 | "no-control-regex": "error",
|
33 | 35 | "no-constructor-return": "error",
|
|
47 | 49 | "no-inner-declarations": "error",
|
48 | 50 | "no-invalid-regexp": "error",
|
49 | 51 | "no-irregular-whitespace": "error",
|
| 52 | + "no-loss-of-precision": "error", |
50 | 53 | "no-misleading-character-class": "error",
|
| 54 | + "no-nonoctal-decimal-escape": "error", |
51 | 55 | "no-obj-calls": "error",
|
52 | 56 | "no-prototype-builtins": "error",
|
53 | 57 | "no-regex-spaces": "error",
|
|
57 | 61 | "no-unreachable": "error",
|
58 | 62 | "no-unsafe-finally": "error",
|
59 | 63 | "no-unsafe-negation": "error",
|
| 64 | + "no-unsafe-optional-chaining": "error", |
60 | 65 | "prefer-regex-literals": "error",
|
61 | 66 | "require-atomic-updates": "error",
|
62 | 67 | "require-unicode-regexp": "off",
|
|
69 | 74 | "block-scoped-var": "error",
|
70 | 75 | "class-methods-use-this": "error",
|
71 | 76 | "complexity": "off",
|
72 |
| - "consistent-return": "warn", |
| 77 | + "consistent-return": "off", |
73 | 78 | "curly": "error",
|
74 | 79 | "default-case": "error",
|
| 80 | + "default-case-last": "error", |
75 | 81 | "dot-location": ["error", "property"],
|
76 | 82 | "dot-notation": "error",
|
77 | 83 | "eqeqeq": "error",
|
78 | 84 | "grouped-accessor-pairs": "warn",
|
79 | 85 | "guard-for-in": "warn",
|
| 86 | + "id-denylist": "warn", |
80 | 87 | "max-classes-per-file": ["error", 1],
|
81 | 88 | "max-lines-per-function": "off",
|
82 | 89 | "no-alert": "error",
|
|
111 | 118 | "no-octal": "error",
|
112 | 119 | "no-octal-escape": "error",
|
113 | 120 | "no-param-reassign": "off",
|
| 121 | + "no-promise-executor-return": "error", |
114 | 122 | "no-proto": "error",
|
115 | 123 | "no-redeclare": "error",
|
| 124 | + "no-restricted-exports": "error", |
116 | 125 | "no-restricted-properties": "error",
|
117 | 126 | "no-return-assign": "error",
|
118 | 127 | "no-return-await": "error",
|
|
123 | 132 | "no-setter-return": "error",
|
124 | 133 | "no-throw-literal": "error",
|
125 | 134 | "no-unmodified-loop-condition": "error",
|
| 135 | + "no-unreachable-loop": "error", |
126 | 136 | "no-unused-expressions": "off",
|
127 | 137 | "no-unused-labels": "error",
|
128 | 138 | "no-useless-call": "error",
|
129 | 139 | "no-useless-concat": "error",
|
| 140 | + "no-useless-backreference": "error", |
130 | 141 | "no-useless-escape": "error",
|
131 | 142 | "no-useless-return": "error",
|
132 | 143 | "no-void": "error",
|
|
176 | 187 | "array-bracket-spacing": "error",
|
177 | 188 | "array-element-newline": "off",
|
178 | 189 | "block-spacing": "error",
|
179 |
| - "brace-style": ["error", "stroustrup", { |
180 |
| - "allowSingleLine": true |
181 |
| - }], |
| 190 | + "brace-style": [ |
| 191 | + "error", |
| 192 | + "stroustrup", |
| 193 | + { |
| 194 | + "allowSingleLine": true |
| 195 | + } |
| 196 | + ], |
182 | 197 | "camelcase": "off",
|
183 | 198 | "capitalized-comments": "off",
|
184 | 199 | "comma-dangle": ["error", "never"],
|
185 |
| - "comma-spacing": ["error", { |
186 |
| - "before": false, |
187 |
| - "after": true |
188 |
| - }], |
| 200 | + "comma-spacing": [ |
| 201 | + "error", |
| 202 | + { |
| 203 | + "before": false, |
| 204 | + "after": true |
| 205 | + } |
| 206 | + ], |
189 | 207 | "comma-style": ["error", "last"],
|
190 | 208 | "computed-property-spacing": "error",
|
191 | 209 | "consistent-this": "off",
|
192 | 210 | "eol-last": "error",
|
193 | 211 | "func-call-spacing": "error",
|
194 |
| - "func-name-matching": "error", |
| 212 | + "func-name-matching": "off", |
195 | 213 | "func-names": "off",
|
196 | 214 | "func-style": "off",
|
197 | 215 | "function-paren-newline": ["error", "never"],
|
198 | 216 | "id-blacklist": "error",
|
199 | 217 | "id-length": "off",
|
200 | 218 | "id-match": "error",
|
201 | 219 | "implicit-arrow-linebreak": ["error", "beside"],
|
202 |
| - "indent": ["error", 4, { |
203 |
| - "VariableDeclarator": { |
204 |
| - "var": 1, |
205 |
| - "let": 1, |
206 |
| - "const": 1 |
207 |
| - }, |
208 |
| - "SwitchCase": 1 |
209 |
| - }], |
| 220 | + "indent": [ |
| 221 | + "error", |
| 222 | + 4, |
| 223 | + { |
| 224 | + "VariableDeclarator": { |
| 225 | + "var": 1, |
| 226 | + "let": 1, |
| 227 | + "const": 1 |
| 228 | + }, |
| 229 | + "SwitchCase": 1 |
| 230 | + } |
| 231 | + ], |
210 | 232 | "jsx-quotes": ["error", "prefer-single"],
|
211 | 233 | "key-spacing": "error",
|
212 | 234 | "keyword-spacing": "error",
|
213 | 235 | "line-comment-position": "off",
|
214 | 236 | "linebreak-style": ["error", "unix"],
|
215 |
| - "lines-around-comment": ["error", { |
216 |
| - "beforeBlockComment": true, |
217 |
| - "afterBlockComment": false, |
218 |
| - "beforeLineComment": false, |
219 |
| - "afterLineComment": false, |
220 |
| - "allowBlockStart": true, |
221 |
| - "allowBlockEnd": false, |
222 |
| - "allowObjectStart": true, |
223 |
| - "allowObjectEnd": false, |
224 |
| - "allowArrayStart": true, |
225 |
| - "allowArrayEnd": false |
226 |
| - }], |
227 |
| - "lines-between-class-members": ["error", "always", { |
228 |
| - "exceptAfterSingleLine": true |
229 |
| - }], |
| 237 | + "lines-around-comment": [ |
| 238 | + "error", |
| 239 | + { |
| 240 | + "beforeBlockComment": true, |
| 241 | + "afterBlockComment": false, |
| 242 | + "beforeLineComment": false, |
| 243 | + "afterLineComment": false, |
| 244 | + "allowBlockStart": true, |
| 245 | + "allowBlockEnd": false, |
| 246 | + "allowObjectStart": true, |
| 247 | + "allowObjectEnd": false, |
| 248 | + "allowArrayStart": true, |
| 249 | + "allowArrayEnd": false |
| 250 | + } |
| 251 | + ], |
| 252 | + "lines-between-class-members": [ |
| 253 | + "error", |
| 254 | + "always", |
| 255 | + { |
| 256 | + "exceptAfterSingleLine": true |
| 257 | + } |
| 258 | + ], |
230 | 259 | "max-depth": "error",
|
231 |
| - "max-len": ["error", { |
232 |
| - "code": 120 |
233 |
| - }], |
| 260 | + "max-len": [ |
| 261 | + "error", |
| 262 | + { |
| 263 | + "code": 120 |
| 264 | + } |
| 265 | + ], |
234 | 266 | "max-lines": "off",
|
235 | 267 | "max-nested-callbacks": "error",
|
236 | 268 | "max-params": "off",
|
237 | 269 | "max-statements": "off",
|
238 |
| - "max-statements-per-line": ["error", { |
239 |
| - "max": 2 |
240 |
| - }], |
| 270 | + "max-statements-per-line": [ |
| 271 | + "error", |
| 272 | + { |
| 273 | + "max": 2 |
| 274 | + } |
| 275 | + ], |
241 | 276 | "multiline-comment-style": "off",
|
242 | 277 | "multiline-ternary": "off",
|
243 | 278 | "new-cap": "off",
|
244 | 279 | "new-parens": "error",
|
245 |
| - "newline-per-chained-call": ["error", { |
246 |
| - "ignoreChainWithDepth": 4 |
247 |
| - }], |
| 280 | + "newline-per-chained-call": [ |
| 281 | + "error", |
| 282 | + { |
| 283 | + "ignoreChainWithDepth": 4 |
| 284 | + } |
| 285 | + ], |
248 | 286 | "no-array-constructor": "error",
|
249 | 287 | "no-bitwise": "off",
|
250 | 288 | "no-continue": "off",
|
|
274 | 312 | "operator-assignment": "error",
|
275 | 313 | "operator-linebreak": ["error", "after"],
|
276 | 314 | "padded-blocks": ["error", "never"],
|
277 |
| - "padding-line-between-statements": ["error", |
| 315 | + "padding-line-between-statements": [ |
| 316 | + "error", |
278 | 317 | {
|
279 | 318 | "blankLine": "always",
|
280 | 319 | "prev": "*",
|
|
303 | 342 | "space-in-parens": "error",
|
304 | 343 | "space-infix-ops": "error",
|
305 | 344 | "space-unary-ops": "error",
|
306 |
| - "spaced-comment": ["error", "always", { |
307 |
| - "block": { |
308 |
| - "exceptions": ["!"] |
| 345 | + "spaced-comment": [ |
| 346 | + "error", |
| 347 | + "always", |
| 348 | + { |
| 349 | + "block": { |
| 350 | + "exceptions": ["!"] |
| 351 | + } |
309 | 352 | }
|
310 |
| - }], |
| 353 | + ], |
311 | 354 | "switch-colon-spacing": "error",
|
312 | 355 | "template-tag-spacing": "error",
|
313 | 356 | "unicode-bom": "error",
|
|
349 | 392 |
|
350 | 393 | // Lodash
|
351 | 394 | "lodash/callback-binding": "error",
|
352 |
| - "lodash/collection-method-value": "warn", |
| 395 | + "lodash/collection-method-value": "off", |
353 | 396 | "lodash/collection-return": "error",
|
354 | 397 | "lodash/no-double-unwrap": "error",
|
355 | 398 | "lodash/no-extra-args": "error",
|
|
378 | 421 |
|
379 | 422 | "lodash/prefer-constant": "off",
|
380 | 423 | "lodash/prefer-get": ["warn", 4],
|
381 |
| - "lodash/prefer-includes": ["error", { |
382 |
| - "includeNative": true |
383 |
| - }], |
| 424 | + "lodash/prefer-includes": [ |
| 425 | + "error", |
| 426 | + { |
| 427 | + "includeNative": true |
| 428 | + } |
| 429 | + ], |
384 | 430 | "lodash/prefer-is-nil": "error",
|
385 | 431 | "lodash/prefer-lodash-chain": "error",
|
386 | 432 | "lodash/prefer-lodash-method": "off",
|
|
396 | 442 | "jsdoc/check-param-names": "error",
|
397 | 443 | "jsdoc/check-tag-names": "off",
|
398 | 444 | "jsdoc/check-types": "off",
|
399 |
| - "jsdoc/newline-after-description": "error", |
400 | 445 | "jsdoc/require-description-complete-sentence": "off",
|
401 | 446 | "jsdoc/require-example": "off",
|
402 | 447 | "jsdoc/require-hyphen-before-param-description": "off",
|
|
0 commit comments