@@ -11,12 +11,8 @@ parserOptions:
1111plugins :
1212 - eslint-plugin-unicorn
1313 - eslint-plugin-import
14- - eslint-plugin-vue
15- - eslint-plugin-html
1614 - eslint-plugin-jquery
17-
18- extends :
19- - plugin:vue/recommended
15+ - eslint-plugin-sonarjs
2016
2117env :
2218 es2022 : true
2521globals :
2622 __webpack_public_path__ : true
2723
28- settings :
29- html/html-extensions : [".tmpl"]
30-
3124overrides :
32- - files : ["web_src/**/*.js", "web_src /**/*.vue", "templates/**/*.tmpl "]
25+ - files : ["web_src/**/*.js", "docs /**/*.js "]
3326 env :
3427 browser : true
3528 node : false
36- - files : ["templates/**/*.tmpl"]
37- rules :
38- no-tabs : [0]
39- indent : [2, tab, {SwitchCase: 1}]
4029 - files : ["web_src/**/*worker.js"]
4130 env :
4231 worker : true
4332 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]
4534 - files : ["build/generate-images.js"]
4635 rules :
4736 import/no-unresolved : [0]
@@ -120,7 +109,7 @@ rules:
120109 import/no-extraneous-dependencies : [2]
121110 import/no-import-module-exports : [0]
122111 import/no-internal-modules : [0]
123- import/no-mutable-exports : [2 ]
112+ import/no-mutable-exports : [0 ]
124113 import/no-named-as-default-member : [0]
125114 import/no-named-as-default : [2]
126115 import/no-named-default : [0]
@@ -132,7 +121,7 @@ rules:
132121 import/no-restricted-paths : [0]
133122 import/no-self-import : [2]
134123 import/no-unassigned-import : [0]
135- import/no-unresolved : [2, {commonjs: true}]
124+ import/no-unresolved : [2, {commonjs: true, ignore: ["\\?.+$"] }]
136125 import/no-unused-modules : [2, {unusedExports: true}]
137126 import/no-useless-path-segments : [2, {commonjs: true}]
138127 import/no-webpack-loader-syntax : [2]
@@ -222,7 +211,7 @@ rules:
222211 no-compare-neg-zero : [2]
223212 no-cond-assign : [2, except-parens]
224213 no-confusing-arrow : [0]
225- no-console : [1, {allow: [info, warn, error]}]
214+ no-console : [1, {allow: [debug, info, warn, error]}]
226215 no-const-assign : [2]
227216 no-constant-binary-expression : [2]
228217 no-constant-condition : [0]
@@ -298,7 +287,7 @@ rules:
298287 no-redeclare : [2]
299288 no-regex-spaces : [2]
300289 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 ]
302291 no-restricted-imports : [0]
303292 no-restricted-syntax : [2, WithStatement, ForInStatement, LabeledStatement]
304293 no-return-assign : [0]
@@ -332,7 +321,7 @@ rules:
332321 no-unused-labels : [2]
333322 no-unused-private-class-members : [2]
334323 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} ]
336325 no-useless-backreference : [0]
337326 no-useless-call : [2]
338327 no-useless-catch : [2]
@@ -358,7 +347,7 @@ rules:
358347 padded-blocks : [2, never]
359348 padding-line-between-statements : [0]
360349 prefer-arrow-callback : [2, {allowNamedFunctions: true, allowUnboundThis: true}]
361- prefer-const : [2, {destructuring: all}]
350+ prefer-const : [2, {destructuring: all, ignoreReadBeforeAssign: true }]
362351 prefer-destructuring : [0]
363352 prefer-exponentiation-operator : [2]
364353 prefer-named-capture-group : [0]
@@ -381,6 +370,38 @@ rules:
381370 semi-spacing : [2, {before: false, after: true}]
382371 semi-style : [2, last]
383372 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]
384405 sort-imports : [0]
385406 sort-keys : [0]
386407 sort-vars : [0]
@@ -428,7 +449,7 @@ rules:
428449 unicorn/no-new-array : [0]
429450 unicorn/no-new-buffer : [0]
430451 unicorn/no-null : [0]
431- unicorn/no-object-as-default-parameter : [2 ]
452+ unicorn/no-object-as-default-parameter : [0 ]
432453 unicorn/no-process-exit : [0]
433454 unicorn/no-reduce : [2]
434455 unicorn/no-static-only-class : [2]
@@ -454,14 +475,16 @@ rules:
454475 unicorn/prefer-array-index-of : [2]
455476 unicorn/prefer-array-some : [2]
456477 unicorn/prefer-at : [0]
457- unicorn/prefer-code-point : [2 ]
478+ unicorn/prefer-code-point : [0 ]
458479 unicorn/prefer-dataset : [2]
459480 unicorn/prefer-date-now : [2]
460481 unicorn/prefer-default-parameters : [0]
461482 unicorn/prefer-event-key : [2]
483+ unicorn/prefer-event-target : [2]
462484 unicorn/prefer-export-from : [2]
463485 unicorn/prefer-includes : [2]
464486 unicorn/prefer-json-parse-buffer : [0]
487+ unicorn/prefer-logical-operator-over-ternary : [2]
465488 unicorn/prefer-math-trunc : [2]
466489 unicorn/prefer-modern-dom-apis : [0]
467490 unicorn/prefer-modern-math-apis : [2]
@@ -502,11 +525,6 @@ rules:
502525 use-isnan : [2]
503526 valid-typeof : [2, {requireStringLiterals: true}]
504527 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]
510528 wrap-iife : [2, inside]
511529 wrap-regex : [0]
512530 yield-star-spacing : [2, after]
0 commit comments