@@ -11,12 +11,8 @@ parserOptions:
11
11
plugins :
12
12
- eslint-plugin-unicorn
13
13
- eslint-plugin-import
14
- - eslint-plugin-vue
15
- - eslint-plugin-html
16
14
- eslint-plugin-jquery
17
-
18
- extends :
19
- - plugin:vue/recommended
15
+ - eslint-plugin-sonarjs
20
16
21
17
env :
22
18
es2022 : true
25
21
globals :
26
22
__webpack_public_path__ : true
27
23
28
- settings :
29
- html/html-extensions : [".tmpl"]
30
-
31
24
overrides :
32
- - files : ["web_src/**/*.js", "web_src /**/*.vue", "templates/**/*.tmpl "]
25
+ - files : ["web_src/**/*.js", "docs /**/*.js "]
33
26
env :
34
27
browser : true
35
28
node : false
36
- - files : ["templates/**/*.tmpl"]
37
- rules :
38
- no-tabs : [0]
39
- indent : [2, tab, {SwitchCase: 1}]
40
29
- files : ["web_src/**/*worker.js"]
41
30
env :
42
31
worker : true
43
32
rules :
44
- no-restricted-globals : [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, location, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, status, statusbar, stop, toolbar, top]
33
+ no-restricted-globals : [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, status, statusbar, stop, toolbar, top]
45
34
- files : ["build/generate-images.js"]
46
35
rules :
47
36
import/no-unresolved : [0]
@@ -120,7 +109,7 @@ rules:
120
109
import/no-extraneous-dependencies : [2]
121
110
import/no-import-module-exports : [0]
122
111
import/no-internal-modules : [0]
123
- import/no-mutable-exports : [2 ]
112
+ import/no-mutable-exports : [0 ]
124
113
import/no-named-as-default-member : [0]
125
114
import/no-named-as-default : [2]
126
115
import/no-named-default : [0]
@@ -132,7 +121,7 @@ rules:
132
121
import/no-restricted-paths : [0]
133
122
import/no-self-import : [2]
134
123
import/no-unassigned-import : [0]
135
- import/no-unresolved : [2, {commonjs: true}]
124
+ import/no-unresolved : [2, {commonjs: true, ignore: ["\\?.+$"] }]
136
125
import/no-unused-modules : [2, {unusedExports: true}]
137
126
import/no-useless-path-segments : [2, {commonjs: true}]
138
127
import/no-webpack-loader-syntax : [2]
@@ -222,7 +211,7 @@ rules:
222
211
no-compare-neg-zero : [2]
223
212
no-cond-assign : [2, except-parens]
224
213
no-confusing-arrow : [0]
225
- no-console : [1, {allow: [info, warn, error]}]
214
+ no-console : [1, {allow: [debug, info, warn, error]}]
226
215
no-const-assign : [2]
227
216
no-constant-binary-expression : [2]
228
217
no-constant-condition : [0]
@@ -298,7 +287,7 @@ rules:
298
287
no-redeclare : [2]
299
288
no-regex-spaces : [2]
300
289
no-restricted-exports : [0]
301
- no-restricted-globals : [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, location, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, self, status, statusbar, stop, toolbar, top]
290
+ no-restricted-globals : [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, location, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, self, status, statusbar, stop, toolbar, top, __dirname, __filename ]
302
291
no-restricted-imports : [0]
303
292
no-restricted-syntax : [2, WithStatement, ForInStatement, LabeledStatement]
304
293
no-return-assign : [0]
@@ -332,7 +321,7 @@ rules:
332
321
no-unused-labels : [2]
333
322
no-unused-private-class-members : [2]
334
323
no-unused-vars : [2, {args: all, argsIgnorePattern: ^_, varsIgnorePattern: ^_, caughtErrorsIgnorePattern: ^_, destructuredArrayIgnorePattern: ^_, ignoreRestSiblings: false}]
335
- no-use-before-define : [2, nofunc ]
324
+ no-use-before-define : [2, {functions: false, classes: true, variables: true, allowNamedExports: true} ]
336
325
no-useless-backreference : [0]
337
326
no-useless-call : [2]
338
327
no-useless-catch : [2]
@@ -358,7 +347,7 @@ rules:
358
347
padded-blocks : [2, never]
359
348
padding-line-between-statements : [0]
360
349
prefer-arrow-callback : [2, {allowNamedFunctions: true, allowUnboundThis: true}]
361
- prefer-const : [2, {destructuring: all}]
350
+ prefer-const : [2, {destructuring: all, ignoreReadBeforeAssign: true }]
362
351
prefer-destructuring : [0]
363
352
prefer-exponentiation-operator : [2]
364
353
prefer-named-capture-group : [0]
@@ -381,6 +370,38 @@ rules:
381
370
semi-spacing : [2, {before: false, after: true}]
382
371
semi-style : [2, last]
383
372
semi : [2, always, {omitLastInOneLineBlock: true}]
373
+ sonarjs/cognitive-complexity : [0]
374
+ sonarjs/elseif-without-else : [0]
375
+ sonarjs/max-switch-cases : [0]
376
+ sonarjs/no-all-duplicated-branches : [2]
377
+ sonarjs/no-collapsible-if : [0]
378
+ sonarjs/no-collection-size-mischeck : [2]
379
+ sonarjs/no-duplicate-string : [0]
380
+ sonarjs/no-duplicated-branches : [0]
381
+ sonarjs/no-element-overwrite : [2]
382
+ sonarjs/no-empty-collection : [2]
383
+ sonarjs/no-extra-arguments : [0]
384
+ sonarjs/no-gratuitous-expressions : [2]
385
+ sonarjs/no-identical-conditions : [2]
386
+ sonarjs/no-identical-expressions : [0]
387
+ sonarjs/no-identical-functions : [0]
388
+ sonarjs/no-ignored-return : [2]
389
+ sonarjs/no-inverted-boolean-check : [2]
390
+ sonarjs/no-nested-switch : [0]
391
+ sonarjs/no-nested-template-literals : [0]
392
+ sonarjs/no-one-iteration-loop : [2]
393
+ sonarjs/no-redundant-boolean : [2]
394
+ sonarjs/no-redundant-jump : [0]
395
+ sonarjs/no-same-line-conditional : [2]
396
+ sonarjs/no-small-switch : [0]
397
+ sonarjs/no-unused-collection : [2]
398
+ sonarjs/no-use-of-empty-return-value : [2]
399
+ sonarjs/no-useless-catch : [0]
400
+ sonarjs/non-existent-operator : [2]
401
+ sonarjs/prefer-immediate-return : [0]
402
+ sonarjs/prefer-object-literal : [0]
403
+ sonarjs/prefer-single-boolean-return : [0]
404
+ sonarjs/prefer-while : [2]
384
405
sort-imports : [0]
385
406
sort-keys : [0]
386
407
sort-vars : [0]
@@ -428,7 +449,7 @@ rules:
428
449
unicorn/no-new-array : [0]
429
450
unicorn/no-new-buffer : [0]
430
451
unicorn/no-null : [0]
431
- unicorn/no-object-as-default-parameter : [2 ]
452
+ unicorn/no-object-as-default-parameter : [0 ]
432
453
unicorn/no-process-exit : [0]
433
454
unicorn/no-reduce : [2]
434
455
unicorn/no-static-only-class : [2]
@@ -454,14 +475,16 @@ rules:
454
475
unicorn/prefer-array-index-of : [2]
455
476
unicorn/prefer-array-some : [2]
456
477
unicorn/prefer-at : [0]
457
- unicorn/prefer-code-point : [2 ]
478
+ unicorn/prefer-code-point : [0 ]
458
479
unicorn/prefer-dataset : [2]
459
480
unicorn/prefer-date-now : [2]
460
481
unicorn/prefer-default-parameters : [0]
461
482
unicorn/prefer-event-key : [2]
483
+ unicorn/prefer-event-target : [2]
462
484
unicorn/prefer-export-from : [2]
463
485
unicorn/prefer-includes : [2]
464
486
unicorn/prefer-json-parse-buffer : [0]
487
+ unicorn/prefer-logical-operator-over-ternary : [2]
465
488
unicorn/prefer-math-trunc : [2]
466
489
unicorn/prefer-modern-dom-apis : [0]
467
490
unicorn/prefer-modern-math-apis : [2]
@@ -502,11 +525,6 @@ rules:
502
525
use-isnan : [2]
503
526
valid-typeof : [2, {requireStringLiterals: true}]
504
527
vars-on-top : [0]
505
- vue/attributes-order : [0]
506
- vue/component-definition-name-casing : [0]
507
- vue/html-closing-bracket-spacing : [0]
508
- vue/max-attributes-per-line : [0]
509
- vue/one-component-per-file : [0]
510
528
wrap-iife : [2, inside]
511
529
wrap-regex : [0]
512
530
yield-star-spacing : [2, after]
0 commit comments