|
2 | 2 | "plugins": ["filenames", "import", "jsdoc", "promise", "unicorn"], |
3 | 3 |
|
4 | 4 | "parserOptions": { |
5 | | - "ecmaVersion": 2020, |
6 | 5 | "sourceType": "module" |
7 | 6 | }, |
8 | 7 |
|
9 | | - "globals": { |
10 | | - "globalThis": "readonly" |
| 8 | + "env": { |
| 9 | + "browser": true, |
| 10 | + "es2020": true, |
| 11 | + "webextensions": true |
11 | 12 | }, |
12 | 13 |
|
13 | 14 | "rules": { |
|
41 | 42 | "skipRegExps": false, |
42 | 43 | "skipTemplates": false |
43 | 44 | }], |
| 45 | + "no-loss-of-precision": 2, |
44 | 46 | "no-misleading-character-class": 2, |
45 | 47 | "no-obj-calls": 2, |
| 48 | + "no-promise-executor-return": 2, |
46 | 49 | "no-prototype-builtins": 2, |
47 | 50 | "no-regex-spaces": 2, |
48 | 51 | "no-setter-return": 2, |
49 | 52 | "no-sparse-arrays": 2, |
50 | 53 | "no-template-curly-in-string": 2, |
51 | 54 | "no-unexpected-multiline": 2, |
52 | 55 | "no-unreachable": 2, |
| 56 | + "no-unreachable-loop": 2, |
53 | 57 | "no-unsafe-finally": 2, |
54 | 58 | "no-unsafe-negation": [2, { "enforceForOrderingRelations": true }], |
55 | 59 | "require-atomic-updates": 0, |
|
62 | 66 | "accessor-pairs": [2, { "enforceForClassMembers": true }], |
63 | 67 | "array-callback-return": 2, |
64 | 68 | "block-scoped-var": 2, |
65 | | - "class-methods-use-this": 0, |
| 69 | + "class-methods-use-this": 2, |
66 | 70 | "complexity": [1, { "max": 50 }], |
67 | 71 | "consistent-return": 2, |
68 | 72 | "curly": 2, |
69 | | - "default-case": 0, |
| 73 | + "default-case": 2, |
70 | 74 | "default-param-last": 2, |
71 | 75 | "dot-location": [2, "property"], |
72 | 76 | "dot-notation": [2, { "allowKeywords": true, "allowPattern": "_" }], |
73 | 77 | "eqeqeq": 2, |
74 | 78 | "grouped-accessor-pairs": [2, "getBeforeSet"], |
75 | | - "guard-for-in": 0, |
| 79 | + "guard-for-in": 2, |
76 | 80 | "max-classes-per-file": 2, |
77 | 81 | "no-alert": 2, |
78 | 82 | "no-caller": 2, |
|
82 | 86 | "no-else-return": [2, { "allowElseIf": false }], |
83 | 87 | "no-empty-function": [2, { "allow": ["arrowFunctions"] }], |
84 | 88 | "no-empty-pattern": 2, |
85 | | - "no-eq-null": 0, |
| 89 | + "no-eq-null": 2, |
86 | 90 | "no-eval": 2, |
87 | 91 | "no-extend-native": 2, |
88 | 92 | "no-extra-bind": 2, |
|
112 | 116 | }], |
113 | 117 | "no-proto": 2, |
114 | 118 | "no-redeclare": 2, |
| 119 | + "no-restricted-properties": 2, |
115 | 120 | "no-return-assign": 2, |
116 | 121 | "no-return-await": 2, |
117 | 122 | "no-script-url": 2, |
|
121 | 126 | "no-throw-literal": 2, |
122 | 127 | "no-unmodified-loop-condition": 2, |
123 | 128 | "no-unused-expressions": 2, |
124 | | - "no-unused-labels": 0, |
| 129 | + "no-unused-labels": 2, |
125 | 130 | "no-useless-call": 2, |
126 | 131 | "no-useless-catch": 2, |
127 | 132 | "no-useless-concat": 2, |
|
137 | 142 | "require-await": 2, |
138 | 143 | "require-unicode-regexp": 2, |
139 | 144 | "vars-on-top": 0, |
140 | | - "wrap-iife": 0, |
| 145 | + "wrap-iife": 2, |
141 | 146 | "yoda": [2, "always"], |
142 | 147 |
|
143 | 148 | "strict": [2, "never"], |
144 | 149 |
|
145 | 150 | "init-declarations": 0, |
146 | 151 | "no-delete-var": 2, |
147 | | - "no-label-var": 0, |
148 | | - "no-restricted-globals": 0, |
| 152 | + "no-label-var": 2, |
| 153 | + "no-restricted-globals": [2, "event"], |
149 | 154 | "no-shadow-restricted-names": 2, |
150 | 155 | "no-shadow": 2, |
151 | 156 | "no-undef": 2, |
|
156 | 161 | }], |
157 | 162 | "no-use-before-define": 2, |
158 | 163 |
|
159 | | - "callback-return": 0, |
160 | | - "global-require": 0, |
161 | | - "handle-callback-err": 2, |
162 | | - "no-buffer-constructor": 2, |
163 | | - "no-mixed-requires": 2, |
164 | | - "no-new-require": 2, |
165 | | - "no-path-concat": 2, |
166 | | - "no-process-env": 2, |
167 | | - "no-process-exit": 0, |
168 | | - "no-restricted-modules": 0, |
169 | | - "no-restricted-properties": 0, |
170 | | - "no-sync": 0, |
171 | | - |
172 | 164 | "array-bracket-newline": [2, "consistent"], |
173 | 165 | "array-bracket-spacing": 2, |
174 | | - "array-element-newline": 0, |
| 166 | + "array-element-newline": [2, "consistent"], |
175 | 167 | "block-spacing": 2, |
176 | 168 | "brace-style": 2, |
177 | 169 | "camelcase": 2, |
|
200 | 192 | "jsx-quotes": 0, |
201 | 193 | "key-spacing": [2, { "mode": "minimum", "align": "value" }], |
202 | 194 | "keyword-spacing": 2, |
203 | | - "line-comment-position": 0, |
| 195 | + "line-comment-position": 2, |
204 | 196 | "linebreak-style": 2, |
205 | 197 | "lines-around-comment": 2, |
206 | 198 | "lines-between-class-members": 2, |
|
224 | 216 | "no-array-constructor": 2, |
225 | 217 | "no-bitwise": 0, |
226 | 218 | "no-continue": 0, |
227 | | - "no-inline-comments": 0, |
| 219 | + "no-inline-comments": 2, |
228 | 220 | "no-lonely-if": 2, |
229 | 221 | "no-mixed-operators": 0, |
230 | 222 | "no-mixed-spaces-and-tabs": 2, |
|
235 | 227 | "no-new-object": 2, |
236 | 228 | "no-plusplus": 0, |
237 | 229 | "no-restricted-syntax": [2, |
238 | | - "EmptyStatement", "FunctionDeclaration", "LabeledStatement", |
239 | | - "MetaProperty", "WithStatement", "JSXIdentifier", |
240 | | - "JSXNamespacedName", "JSXMemberExpression", "JSXEmptyExpression", |
241 | | - "JSXExpressionContainer", "JSXElement", "JSXClosingElement", |
242 | | - "JSXOpeningElement", "JSXAttribute", "JSXSpreadAttribute", "JSXText" |
| 230 | + "ClassDeclaration", |
| 231 | + "DebuggerStatement", |
| 232 | + "EmptyStatement", |
| 233 | + "ForInStatement", |
| 234 | + "FunctionDeclaration", |
| 235 | + "LabeledStatement", |
| 236 | + "SequenceExpression", |
| 237 | + "TaggedTemplateExpression", |
| 238 | + "WithStatement", |
| 239 | + "YieldExpression", |
| 240 | + "JSXIdentifier", |
| 241 | + "JSXNamespacedName", |
| 242 | + "JSXMemberExpression", |
| 243 | + "JSXEmptyExpression", |
| 244 | + "JSXExpressionContainer", |
| 245 | + "JSXElement", |
| 246 | + "JSXClosingElement", |
| 247 | + "JSXOpeningElement", |
| 248 | + "JSXAttribute", |
| 249 | + "JSXSpreadAttribute", |
| 250 | + "JSXText", |
| 251 | + "ExportDefaultDeclaration", |
| 252 | + "ExportAllDeclaration", |
| 253 | + "ExportSpecifier" |
243 | 254 | ], |
244 | 255 | "no-tabs": 2, |
245 | 256 | "no-ternary": 0, |
|
262 | 273 | "blankLine": "always", "prev": "directive", "next": "*" |
263 | 274 | }], |
264 | 275 | "prefer-exponentiation-operator": 2, |
265 | | - "prefer-object-spread": 0, |
| 276 | + "prefer-object-spread": 2, |
266 | 277 | "quote-props": [2, "as-needed"], |
267 | 278 | "quotes": [2, "double", { "allowTemplateLiterals": true }], |
268 | 279 | "semi": 2, |
|
301 | 312 | "no-useless-constructor": 2, |
302 | 313 | "no-useless-rename": 2, |
303 | 314 | "no-var": 2, |
304 | | - "object-shorthand": 0, |
305 | | - "prefer-arrow-callback": 0, |
| 315 | + "object-shorthand": 2, |
| 316 | + "prefer-arrow-callback": 2, |
306 | 317 | "prefer-const": 2, |
307 | 318 | "prefer-destructuring": 0, |
308 | 319 | "prefer-numeric-literals": 2, |
|
316 | 327 | "template-curly-spacing": 2, |
317 | 328 | "yield-star-spacing": 2, |
318 | 329 |
|
319 | | - "filenames/match-regex": [2, "^[_a-z][-0-9_a-z]+$"], |
| 330 | + "filenames/match-regex": [2, "^_?[a-z][0-9a-z]*(-[0-9a-z]+)*$"], |
320 | 331 | "filenames/match-exported": [2, "kebab"], |
321 | 332 | "filenames/no-index": 0, |
322 | 333 |
|
|
333 | 344 | "import/no-cycle": 2, |
334 | 345 | "import/no-useless-path-segments": 2, |
335 | 346 | "import/no-relative-parent-imports": 0, |
336 | | - "import/no-unused-modules": 0, |
| 347 | + "import/no-unused-modules": 2, |
337 | 348 |
|
338 | 349 | "import/export": 2, |
339 | 350 | "import/no-named-as-default": 2, |
|
356 | 367 | "import/newline-after-import": 2, |
357 | 368 | "import/prefer-default-export": 0, |
358 | 369 | "import/max-dependencies": 0, |
359 | | - "import/no-unassigned-import": 0, |
| 370 | + "import/no-unassigned-import": 2, |
360 | 371 | "import/no-named-default": 2, |
361 | 372 | "import/no-default-export": 2, |
362 | 373 | "import/no-named-export": 0, |
363 | 374 | "import/no-anonymous-default-export": 2, |
364 | 375 | "import/group-exports": 0, |
365 | 376 | "import/dynamic-import-chunkname": 2, |
366 | 377 |
|
| 378 | + "jsdoc/check-access": 2, |
367 | 379 | "jsdoc/check-alignment": 2, |
368 | 380 | "jsdoc/check-examples": 2, |
369 | 381 | "jsdoc/check-indentation": 0, |
370 | 382 | "jsdoc/check-param-names": 2, |
| 383 | + "jsdoc/check-property-names": 2, |
371 | 384 | "jsdoc/check-syntax": 2, |
372 | 385 | "jsdoc/check-tag-names": 2, |
373 | 386 | "jsdoc/check-types": 2, |
| 387 | + "jsdoc/check-values": 2, |
| 388 | + "jsdoc/empty-tags": 2, |
374 | 389 | "jsdoc/implements-on-classes": 2, |
375 | | - "jsdoc/match-description": [2, { "matchDescription": "[A-Z].*" }], |
| 390 | + "jsdoc/match-description": [2, { "matchDescription": "[A-ZÉ].*" }], |
376 | 391 | "jsdoc/newline-after-description": 2, |
377 | 392 | "jsdoc/no-types": 0, |
378 | 393 | "jsdoc/no-undefined-types": [2, { "definedTypes": ["Timeout"] }], |
379 | | - "jsdoc/require-description": 0, |
| 394 | + "jsdoc/require-description": 2, |
380 | 395 | "jsdoc/require-description-complete-sentence": 0, |
381 | 396 | "jsdoc/require-example": 0, |
382 | | - "jsdoc/require-hyphen-before-param-description": 0, |
| 397 | + "jsdoc/require-file-overview": 0, |
| 398 | + "jsdoc/require-hyphen-before-param-description": [2, "never"], |
383 | 399 | "jsdoc/require-jsdoc": 2, |
384 | 400 | "jsdoc/require-param": 2, |
385 | 401 | "jsdoc/require-param-description": 2, |
386 | 402 | "jsdoc/require-param-name": 2, |
387 | 403 | "jsdoc/require-param-type": 2, |
| 404 | + "jsdoc/require-property": 2, |
| 405 | + "jsdoc/require-property-description": 2, |
| 406 | + "jsdoc/require-property-name": 2, |
| 407 | + "jsdoc/require-property-type": 2, |
388 | 408 | "jsdoc/require-returns": 0, |
389 | 409 | "jsdoc/require-returns-check": 2, |
390 | 410 | "jsdoc/require-returns-description": 2, |
|
396 | 416 | "promise/param-names": 2, |
397 | 417 | "promise/always-return": 0, |
398 | 418 | "promise/no-native": 0, |
399 | | - "promise/no-nesting": 0, |
| 419 | + "promise/no-nesting": 2, |
400 | 420 | "promise/no-promise-in-callback": 2, |
401 | 421 | "promise/no-callback-in-promise": 2, |
402 | 422 | "promise/avoid-new": 0, |
|
431 | 451 | "unicorn/no-new-buffer": 2, |
432 | 452 | "unicorn/no-null": 0, |
433 | 453 | "unicorn/no-process-exit": 2, |
| 454 | + "unicorn/no-reduce": 0, |
434 | 455 | "unicorn/no-unreadable-array-destructuring": 2, |
435 | 456 | "unicorn/no-unsafe-regex": 2, |
436 | 457 | "unicorn/no-unused-properties": 2, |
| 458 | + "unicorn/no-useless-undefined": 0, |
437 | 459 | "unicorn/no-zero-fractions": 2, |
438 | 460 | "unicorn/number-literal-case": 2, |
439 | 461 | "unicorn/prefer-add-event-listener": 2, |
|
446 | 468 | "unicorn/prefer-node-append": 2, |
447 | 469 | "unicorn/prefer-node-remove": 2, |
448 | 470 | "unicorn/prefer-number-properties": 2, |
| 471 | + "unicorn/prefer-optional-catch-binding": 2, |
449 | 472 | "unicorn/prefer-query-selector": 2, |
450 | 473 | "unicorn/prefer-reflect-apply": 2, |
451 | | - "unicorn/prefer-replace-all": 0, |
| 474 | + "unicorn/prefer-replace-all": 2, |
452 | 475 | "unicorn/prefer-set-has": 2, |
453 | 476 | "unicorn/prefer-spread": 2, |
454 | 477 | "unicorn/prefer-starts-ends-with": 2, |
|
0 commit comments