@@ -6,17 +6,30 @@ ignorePatterns:
66 - /web_src/fomantic
77 - /public/assets/js
88
9+ parser : " @typescript-eslint/parser"
10+
911parserOptions :
1012 sourceType : module
1113 ecmaVersion : latest
14+ project : true
15+ extraFileExtensions : [".vue"]
16+ parser : " @typescript-eslint/parser" # for vue plugin - https://eslint.vuejs.org/user-guide/#how-to-use-a-custom-parser
17+
18+ settings :
19+ import/extensions : [".js", ".ts"]
20+ import/parsers :
21+ " @typescript-eslint/parser " : [".js", ".ts"]
22+ import/resolver :
23+ typescript : true
1224
1325plugins :
1426 - " @eslint-community/eslint-plugin-eslint-comments"
1527 - " @stylistic/eslint-plugin-js"
28+ - " @typescript-eslint/eslint-plugin"
1629 - eslint-plugin-array-func
30+ - eslint-plugin-deprecation
1731 - eslint-plugin-github
1832 - eslint-plugin-i
19- - eslint-plugin-jquery
2033 - eslint-plugin-no-jquery
2134 - eslint-plugin-no-use-extend-native
2235 - eslint-plugin-regexp
@@ -47,7 +60,15 @@ overrides:
4760 - files : ["*.config.*"]
4861 rules :
4962 i/no-unused-modules : [0]
50- - files : ["**/*.test.*", "web_src/js/test/setup.js"]
63+ - files : ["**/*.d.ts"]
64+ rules :
65+ i/no-unused-modules : [0]
66+ " @typescript-eslint/consistent-type-definitions " : [0]
67+ " @typescript-eslint/consistent-type-imports " : [0]
68+ - files : ["web_src/js/types.ts"]
69+ rules :
70+ i/no-unused-modules : [0]
71+ - files : ["**/*.test.*", "web_src/js/test/setup.ts"]
5172 env :
5273 vitest-globals/env : true
5374 rules :
@@ -100,9 +121,25 @@ overrides:
100121 vitest/valid-describe-callback : [2]
101122 vitest/valid-expect : [2]
102123 vitest/valid-title : [2]
103- - files : ["web_src/js/modules/fetch.js ", "web_src/js/standalone/**/*"]
124+ - files : ["web_src/js/modules/fetch.ts ", "web_src/js/standalone/**/*"]
104125 rules :
105126 no-restricted-syntax : [2, WithStatement, ForInStatement, LabeledStatement, SequenceExpression]
127+ - files : ["**/*.vue"]
128+ plugins :
129+ - eslint-plugin-vue
130+ - eslint-plugin-vue-scoped-css
131+ extends :
132+ - plugin:vue/vue3-recommended
133+ - plugin:vue-scoped-css/vue3-recommended
134+ rules :
135+ vue/attributes-order : [0]
136+ vue/html-closing-bracket-spacing : [2, {startTag: never, endTag: never, selfClosingTag: never}]
137+ vue/max-attributes-per-line : [0]
138+ vue/singleline-html-element-content-newline : [0]
139+ - files : ["tests/e2e/**"]
140+ plugins :
141+ - eslint-plugin-playwright
142+ extends : plugin:playwright/recommended
106143
107144rules :
108145 " @eslint-community/eslint-comments/disable-enable-pair " : [2]
@@ -182,6 +219,125 @@ rules:
182219 " @stylistic/js/wrap-iife " : [2, inside]
183220 " @stylistic/js/wrap-regex " : [0]
184221 " @stylistic/js/yield-star-spacing " : [2, after]
222+ " @typescript-eslint/adjacent-overload-signatures " : [0]
223+ " @typescript-eslint/array-type " : [0]
224+ " @typescript-eslint/await-thenable " : [2]
225+ " @typescript-eslint/ban-ts-comment " : [2, {'ts-expect-error': false, 'ts-ignore': true, 'ts-nocheck': false, 'ts-check': false}]
226+ " @typescript-eslint/ban-tslint-comment " : [0]
227+ " @typescript-eslint/class-literal-property-style " : [0]
228+ " @typescript-eslint/class-methods-use-this " : [0]
229+ " @typescript-eslint/consistent-generic-constructors " : [0]
230+ " @typescript-eslint/consistent-indexed-object-style " : [0]
231+ " @typescript-eslint/consistent-return " : [0]
232+ " @typescript-eslint/consistent-type-assertions " : [2, {assertionStyle: as, objectLiteralTypeAssertions: allow}]
233+ " @typescript-eslint/consistent-type-definitions " : [2, type]
234+ " @typescript-eslint/consistent-type-exports " : [2, {fixMixedExportsWithInlineTypeSpecifier: false}]
235+ " @typescript-eslint/consistent-type-imports " : [2, {prefer: type-imports, fixStyle: separate-type-imports, disallowTypeAnnotations: true}]
236+ " @typescript-eslint/default-param-last " : [0]
237+ " @typescript-eslint/dot-notation " : [0]
238+ " @typescript-eslint/explicit-function-return-type " : [0]
239+ " @typescript-eslint/explicit-member-accessibility " : [0]
240+ " @typescript-eslint/explicit-module-boundary-types " : [0]
241+ " @typescript-eslint/init-declarations " : [0]
242+ " @typescript-eslint/max-params " : [0]
243+ " @typescript-eslint/member-ordering " : [0]
244+ " @typescript-eslint/method-signature-style " : [0]
245+ " @typescript-eslint/naming-convention " : [0]
246+ " @typescript-eslint/no-array-constructor " : [2]
247+ " @typescript-eslint/no-array-delete " : [2]
248+ " @typescript-eslint/no-base-to-string " : [0]
249+ " @typescript-eslint/no-confusing-non-null-assertion " : [2]
250+ " @typescript-eslint/no-confusing-void-expression " : [0]
251+ " @typescript-eslint/no-dupe-class-members " : [0]
252+ " @typescript-eslint/no-duplicate-enum-values " : [2]
253+ " @typescript-eslint/no-duplicate-type-constituents " : [2, {ignoreUnions: true}]
254+ " @typescript-eslint/no-dynamic-delete " : [0]
255+ " @typescript-eslint/no-empty-function " : [0]
256+ " @typescript-eslint/no-empty-interface " : [0]
257+ " @typescript-eslint/no-empty-object-type " : [2]
258+ " @typescript-eslint/no-explicit-any " : [0]
259+ " @typescript-eslint/no-extra-non-null-assertion " : [2]
260+ " @typescript-eslint/no-extraneous-class " : [0]
261+ " @typescript-eslint/no-floating-promises " : [0]
262+ " @typescript-eslint/no-for-in-array " : [2]
263+ " @typescript-eslint/no-implied-eval " : [2]
264+ " @typescript-eslint/no-import-type-side-effects " : [0] # dupe with consistent-type-imports
265+ " @typescript-eslint/no-inferrable-types " : [0]
266+ " @typescript-eslint/no-invalid-this " : [0]
267+ " @typescript-eslint/no-invalid-void-type " : [0]
268+ " @typescript-eslint/no-loop-func " : [0]
269+ " @typescript-eslint/no-loss-of-precision " : [0]
270+ " @typescript-eslint/no-magic-numbers " : [0]
271+ " @typescript-eslint/no-meaningless-void-operator " : [0]
272+ " @typescript-eslint/no-misused-new " : [2]
273+ " @typescript-eslint/no-misused-promises " : [2, {checksVoidReturn: {attributes: false, arguments: false}}]
274+ " @typescript-eslint/no-mixed-enums " : [0]
275+ " @typescript-eslint/no-namespace " : [2]
276+ " @typescript-eslint/no-non-null-asserted-nullish-coalescing " : [0]
277+ " @typescript-eslint/no-non-null-asserted-optional-chain " : [2]
278+ " @typescript-eslint/no-non-null-assertion " : [0]
279+ " @typescript-eslint/no-redeclare " : [0]
280+ " @typescript-eslint/no-redundant-type-constituents " : [2]
281+ " @typescript-eslint/no-require-imports " : [2]
282+ " @typescript-eslint/no-restricted-imports " : [0]
283+ " @typescript-eslint/no-restricted-types " : [0]
284+ " @typescript-eslint/no-shadow " : [0]
285+ " @typescript-eslint/no-this-alias " : [0] # handled by unicorn/no-this-assignment
286+ " @typescript-eslint/no-unnecessary-boolean-literal-compare " : [0]
287+ " @typescript-eslint/no-unnecessary-condition " : [0]
288+ " @typescript-eslint/no-unnecessary-qualifier " : [0]
289+ " @typescript-eslint/no-unnecessary-template-expression " : [0]
290+ " @typescript-eslint/no-unnecessary-type-arguments " : [0]
291+ " @typescript-eslint/no-unnecessary-type-assertion " : [2]
292+ " @typescript-eslint/no-unnecessary-type-constraint " : [2]
293+ " @typescript-eslint/no-unsafe-argument " : [0]
294+ " @typescript-eslint/no-unsafe-assignment " : [0]
295+ " @typescript-eslint/no-unsafe-call " : [0]
296+ " @typescript-eslint/no-unsafe-declaration-merging " : [2]
297+ " @typescript-eslint/no-unsafe-enum-comparison " : [2]
298+ " @typescript-eslint/no-unsafe-function-type " : [2]
299+ " @typescript-eslint/no-unsafe-member-access " : [0]
300+ " @typescript-eslint/no-unsafe-return " : [0]
301+ " @typescript-eslint/no-unsafe-unary-minus " : [2]
302+ " @typescript-eslint/no-unused-expressions " : [0]
303+ " @typescript-eslint/no-unused-vars " : [2, {vars: all, args: all, caughtErrors: all, ignoreRestSiblings: false, argsIgnorePattern: ^_, varsIgnorePattern: ^_, caughtErrorsIgnorePattern: ^_, destructuredArrayIgnorePattern: ^_}]
304+ " @typescript-eslint/no-use-before-define " : [0]
305+ " @typescript-eslint/no-useless-constructor " : [0]
306+ " @typescript-eslint/no-useless-empty-export " : [0]
307+ " @typescript-eslint/no-wrapper-object-types " : [2]
308+ " @typescript-eslint/non-nullable-type-assertion-style " : [0]
309+ " @typescript-eslint/only-throw-error " : [2]
310+ " @typescript-eslint/parameter-properties " : [0]
311+ " @typescript-eslint/prefer-as-const " : [2]
312+ " @typescript-eslint/prefer-destructuring " : [0]
313+ " @typescript-eslint/prefer-enum-initializers " : [0]
314+ " @typescript-eslint/prefer-find " : [2]
315+ " @typescript-eslint/prefer-for-of " : [2]
316+ " @typescript-eslint/prefer-function-type " : [2]
317+ " @typescript-eslint/prefer-includes " : [2]
318+ " @typescript-eslint/prefer-literal-enum-member " : [0]
319+ " @typescript-eslint/prefer-namespace-keyword " : [0]
320+ " @typescript-eslint/prefer-nullish-coalescing " : [0]
321+ " @typescript-eslint/prefer-optional-chain " : [2, {requireNullish: true}]
322+ " @typescript-eslint/prefer-promise-reject-errors " : [0]
323+ " @typescript-eslint/prefer-readonly " : [0]
324+ " @typescript-eslint/prefer-readonly-parameter-types " : [0]
325+ " @typescript-eslint/prefer-reduce-type-parameter " : [0]
326+ " @typescript-eslint/prefer-regexp-exec " : [0]
327+ " @typescript-eslint/prefer-return-this-type " : [0]
328+ " @typescript-eslint/prefer-string-starts-ends-with " : [2, {allowSingleElementEquality: always}]
329+ " @typescript-eslint/promise-function-async " : [0]
330+ " @typescript-eslint/require-array-sort-compare " : [0]
331+ " @typescript-eslint/require-await " : [0]
332+ " @typescript-eslint/restrict-plus-operands " : [2]
333+ " @typescript-eslint/restrict-template-expressions " : [0]
334+ " @typescript-eslint/return-await " : [0]
335+ " @typescript-eslint/strict-boolean-expressions " : [0]
336+ " @typescript-eslint/switch-exhaustiveness-check " : [0]
337+ " @typescript-eslint/triple-slash-reference " : [2]
338+ " @typescript-eslint/typedef " : [0]
339+ " @typescript-eslint/unbound-method " : [0] # too many false-positives
340+ " @typescript-eslint/unified-signatures " : [2]
185341 accessor-pairs : [2]
186342 array-callback-return : [2, {checkForEach: true}]
187343 array-func/avoid-reverse : [2]
@@ -203,6 +359,7 @@ rules:
203359 default-case-last : [2]
204360 default-case : [0]
205361 default-param-last : [0]
362+ deprecation/deprecation : [2]
206363 dot-notation : [0]
207364 eqeqeq : [2]
208365 for-direction : [2]
@@ -264,7 +421,7 @@ rules:
264421 i/no-internal-modules : [0]
265422 i/no-mutable-exports : [0]
266423 i/no-named-as-default-member : [0]
267- i/no-named-as-default : [2 ]
424+ i/no-named-as-default : [0 ]
268425 i/no-named-default : [0]
269426 i/no-named-export : [0]
270427 i/no-namespace : [0]
@@ -274,63 +431,14 @@ rules:
274431 i/no-restricted-paths : [0]
275432 i/no-self-import : [2]
276433 i/no-unassigned-import : [0]
277- i/no-unresolved : [2, {commonjs: true, ignore: ["\\?.+$", ^vitest/ ]}]
434+ i/no-unresolved : [2, {commonjs: true, ignore: ["\\?.+$"]}]
278435 i/no-unused-modules : [2, {unusedExports: true}]
279436 i/no-useless-path-segments : [2, {commonjs: true}]
280437 i/no-webpack-loader-syntax : [2]
281438 i/order : [0]
282439 i/prefer-default-export : [0]
283440 i/unambiguous : [0]
284441 init-declarations : [0]
285- jquery/no-ajax-events : [2]
286- jquery/no-ajax : [2]
287- jquery/no-animate : [2]
288- jquery/no-attr : [2]
289- jquery/no-bind : [2]
290- jquery/no-class : [0]
291- jquery/no-clone : [2]
292- jquery/no-closest : [0]
293- jquery/no-css : [2]
294- jquery/no-data : [0]
295- jquery/no-deferred : [2]
296- jquery/no-delegate : [2]
297- jquery/no-each : [0]
298- jquery/no-extend : [2]
299- jquery/no-fade : [2]
300- jquery/no-filter : [0]
301- jquery/no-find : [0]
302- jquery/no-global-eval : [2]
303- jquery/no-grep : [2]
304- jquery/no-has : [2]
305- jquery/no-hide : [2]
306- jquery/no-html : [0]
307- jquery/no-in-array : [2]
308- jquery/no-is-array : [2]
309- jquery/no-is-function : [2]
310- jquery/no-is : [2]
311- jquery/no-load : [2]
312- jquery/no-map : [2]
313- jquery/no-merge : [2]
314- jquery/no-param : [2]
315- jquery/no-parent : [0]
316- jquery/no-parents : [2]
317- jquery/no-parse-html : [2]
318- jquery/no-prop : [2]
319- jquery/no-proxy : [2]
320- jquery/no-ready : [2]
321- jquery/no-serialize : [2]
322- jquery/no-show : [2]
323- jquery/no-size : [2]
324- jquery/no-sizzle : [2]
325- jquery/no-slide : [2]
326- jquery/no-submit : [2]
327- jquery/no-text : [2]
328- jquery/no-toggle : [2]
329- jquery/no-trigger : [0]
330- jquery/no-trim : [2]
331- jquery/no-val : [0]
332- jquery/no-when : [2]
333- jquery/no-wrap : [2]
334442 line-comment-position : [0]
335443 logical-assignment-operators : [0]
336444 max-classes-per-file : [0]
@@ -343,7 +451,7 @@ rules:
343451 multiline-comment-style : [2, separate-lines]
344452 new-cap : [0]
345453 no-alert : [0]
346- no-array-constructor : [2]
454+ no-array-constructor : [0] # handled by @typescript-eslint/no-array-constructor
347455 no-async-promise-executor : [0]
348456 no-await-in-loop : [0]
349457 no-bitwise : [0]
@@ -368,7 +476,7 @@ rules:
368476 no-dupe-else-if : [2]
369477 no-dupe-keys : [2]
370478 no-duplicate-case : [2]
371- no-duplicate-imports : [2 ]
479+ no-duplicate-imports : [0 ]
372480 no-else-return : [2]
373481 no-empty-character-class : [2]
374482 no-empty-function : [0]
@@ -387,7 +495,7 @@ rules:
387495 no-global-assign : [2]
388496 no-implicit-coercion : [2]
389497 no-implicit-globals : [0]
390- no-implied-eval : [2]
498+ no-implied-eval : [0] # handled by @typescript-eslint/no-implied-eval
391499 no-import-assign : [2]
392500 no-inline-comments : [0]
393501 no-inner-declarations : [2]
@@ -406,7 +514,7 @@ rules:
406514 no-jquery/no-box-model : [2]
407515 no-jquery/no-browser : [2]
408516 no-jquery/no-camel-case : [2]
409- no-jquery/no-class-state : [0 ]
517+ no-jquery/no-class-state : [2 ]
410518 no-jquery/no-class : [0]
411519 no-jquery/no-clone : [2]
412520 no-jquery/no-closest : [0]
@@ -462,7 +570,7 @@ rules:
462570 no-jquery/no-param : [2]
463571 no-jquery/no-parent : [0]
464572 no-jquery/no-parents : [2]
465- no-jquery/no-parse-html-literal : [0 ]
573+ no-jquery/no-parse-html-literal : [2 ]
466574 no-jquery/no-parse-html : [2]
467575 no-jquery/no-parse-json : [2]
468576 no-jquery/no-parse-xml : [2]
@@ -515,12 +623,12 @@ rules:
515623 no-promise-executor-return : [0]
516624 no-proto : [2]
517625 no-prototype-builtins : [2]
518- no-redeclare : [2]
626+ no-redeclare : [0] # must be disabled for typescript overloads
519627 no-regex-spaces : [2]
520628 no-restricted-exports : [0]
521629 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]
522630 no-restricted-imports : [0]
523- no-restricted-syntax : [2, WithStatement, ForInStatement, LabeledStatement, SequenceExpression, {selector: "CallExpression[callee.name='fetch']", message: "use modules/fetch.js instead"}]
631+ no-restricted-syntax : [2, WithStatement, ForInStatement, LabeledStatement, SequenceExpression, {selector: "CallExpression[callee.name='fetch']", message: "use modules/fetch.ts instead"}]
524632 no-return-assign : [0]
525633 no-script-url : [2]
526634 no-self-assign : [2, {props: true}]
@@ -548,7 +656,7 @@ rules:
548656 no-unused-expressions : [2]
549657 no-unused-labels : [2]
550658 no-unused-private-class-members : [2]
551- no-unused-vars : [2, {args: all, argsIgnorePattern: ^_, varsIgnorePattern: ^_, caughtErrorsIgnorePattern: ^_, destructuredArrayIgnorePattern: ^_, ignoreRestSiblings: false}]
659+ no-unused-vars : [0] # handled by @typescript-eslint/no-unused-vars
552660 no-use-before-define : [2, {functions: false, classes: true, variables: true, allowNamedExports: true}]
553661 no-use-extend-native/no-use-extend-native : [2]
554662 no-useless-backreference : [2]
@@ -663,7 +771,7 @@ rules:
663771 regexp/unicode-escape : [0]
664772 regexp/use-ignore-case : [0]
665773 require-atomic-updates : [0]
666- require-await : [0]
774+ require-await : [0] # handled by @typescript-eslint/require-await
667775 require-unicode-regexp : [0]
668776 require-yield : [2]
669777 sonarjs/cognitive-complexity : [0]
@@ -737,9 +845,11 @@ rules:
737845 unicorn/no-invalid-fetch-options : [2]
738846 unicorn/no-invalid-remove-event-listener : [2]
739847 unicorn/no-keyword-prefix : [0]
848+ unicorn/no-length-as-slice-end : [2]
740849 unicorn/no-lonely-if : [2]
741850 unicorn/no-magic-array-flat-depth : [0]
742851 unicorn/no-negated-condition : [0]
852+ unicorn/no-negation-in-equality-check : [2]
743853 unicorn/no-nested-ternary : [0]
744854 unicorn/no-new-array : [0]
745855 unicorn/no-new-buffer : [0]
0 commit comments