@nelsonlaidev/oxlint-config 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -11,14 +11,20 @@ const GLOB_TSX = "**/*.{tsx,ctsx,mtsx}";
11
11
  //#region src/configs/command.ts
12
12
  const command = () => [{
13
13
  files: [GLOB_SRC],
14
- jsPlugins: ["eslint-plugin-command"],
14
+ jsPlugins: [{
15
+ name: "command",
16
+ specifier: "eslint-plugin-command"
17
+ }],
15
18
  rules: { "command/command": "error" }
16
19
  }];
17
20
  //#endregion
18
21
  //#region src/configs/de-morgan.ts
19
22
  const deMorgan = () => [{
20
23
  files: [GLOB_SRC],
21
- jsPlugins: ["eslint-plugin-de-morgan"],
24
+ jsPlugins: [{
25
+ name: "de-morgan",
26
+ specifier: "eslint-plugin-de-morgan"
27
+ }],
22
28
  rules: {
23
29
  "de-morgan/no-negated-conjunction": "error",
24
30
  "de-morgan/no-negated-disjunction": "error"
@@ -30,102 +36,99 @@ const eslint = () => [{
30
36
  files: [GLOB_SRC],
31
37
  plugins: ["eslint"],
32
38
  rules: {
33
- "array-callback-return": "error",
34
- "constructor-super": "error",
35
- eqeqeq: "error",
36
- "for-direction": "error",
37
- "getter-return": "error",
38
- "no-alert": "error",
39
- "no-async-promise-executor": "error",
40
- "no-await-in-loop": "error",
41
- "no-caller": "off",
42
- "no-case-declarations": "error",
43
- "no-class-assign": "error",
44
- "no-compare-neg-zero": "error",
45
- "no-cond-assign": "error",
46
- "no-const-assign": "error",
47
- "no-constant-binary-expression": "error",
48
- "no-constant-condition": "error",
49
- "no-control-regex": "error",
50
- "no-debugger": "error",
51
- "no-delete-var": "error",
52
- "no-dupe-class-members": "error",
53
- "no-dupe-else-if": "error",
54
- "no-dupe-keys": "error",
55
- "no-duplicate-case": "error",
56
- "no-empty": "error",
57
- "no-empty-character-class": "error",
58
- "no-empty-pattern": "error",
59
- "no-empty-static-block": "error",
60
- "no-eval": "error",
61
- "no-ex-assign": "error",
62
- "no-extra-bind": "error",
63
- "no-extra-boolean-cast": "error",
64
- "no-fallthrough": "error",
65
- "no-func-assign": "error",
66
- "no-global-assign": "error",
67
- "no-import-assign": "error",
68
- "no-invalid-regexp": "error",
69
- "no-irregular-whitespace": "error",
70
- "no-iterator": "off",
71
- "no-label-var": "error",
72
- "no-labels": "error",
73
- "no-lone-blocks": "error",
74
- "no-loss-of-precision": "error",
75
- "no-misleading-character-class": "error",
76
- "no-new": "error",
77
- "no-new-func": "error",
78
- "no-new-native-nonconstructor": "error",
79
- "no-nonoctal-decimal-escape": "error",
80
- "no-obj-calls": "error",
81
- "no-param-reassign": "error",
82
- "no-plusplus": ["error", { allowForLoopAfterthoughts: true }],
83
- "no-promise-executor-return": "error",
84
- "no-prototype-builtins": "error",
85
- "no-redeclare": "error",
86
- "no-regex-spaces": "error",
87
- "no-return-assign": "error",
88
- "no-script-url": "error",
89
- "no-self-assign": "error",
90
- "no-self-compare": "error",
91
- "no-sequences": "error",
92
- "no-setter-return": "error",
93
- "no-shadow-restricted-names": "error",
94
- "no-sparse-arrays": "error",
95
- "no-template-curly-in-string": "error",
96
- "no-this-before-super": "error",
97
- "no-unassigned-vars": "error",
98
- "no-undef": "error",
99
- "no-unexpected-multiline": "error",
100
- "no-unneeded-ternary": "error",
101
- "no-unreachable": "error",
102
- "no-unsafe-finally": "error",
103
- "no-unsafe-negation": "error",
104
- "no-unsafe-optional-chaining": "error",
105
- "no-unused-expressions": "off",
106
- "no-unused-labels": "error",
107
- "no-unused-private-class-members": "error",
108
- "no-unused-vars": ["error", { fix: { imports: "safe-fix" } }],
109
- "no-useless-assignment": "error",
110
- "no-useless-backreference": "error",
111
- "no-useless-call": "error",
112
- "no-useless-catch": "error",
113
- "no-useless-computed-key": "error",
114
- "no-useless-concat": "error",
115
- "no-useless-escape": "error",
116
- "no-useless-rename": "error",
117
- "no-useless-return": "error",
118
- "no-var": "error",
119
- "no-void": ["error", { allowAsStatement: true }],
120
- "no-with": "error",
121
- "prefer-object-has-own": "error",
122
- "prefer-object-spread": "error",
123
- "prefer-template": "error",
124
- "preserve-caught-error": "error",
125
- "require-yield": "error",
126
- "symbol-description": "error",
127
- "use-isnan": "error",
128
- "valid-typeof": "error"
39
+ "eslint/array-callback-return": "error",
40
+ "eslint/constructor-super": "error",
41
+ "eslint/eqeqeq": "error",
42
+ "eslint/for-direction": "error",
43
+ "eslint/getter-return": "error",
44
+ "eslint/no-alert": "error",
45
+ "eslint/no-async-promise-executor": "error",
46
+ "eslint/no-await-in-loop": "error",
47
+ "eslint/no-case-declarations": "error",
48
+ "eslint/no-class-assign": "error",
49
+ "eslint/no-compare-neg-zero": "error",
50
+ "eslint/no-cond-assign": "error",
51
+ "eslint/no-const-assign": "error",
52
+ "eslint/no-constant-binary-expression": "error",
53
+ "eslint/no-constant-condition": "error",
54
+ "eslint/no-control-regex": "error",
55
+ "eslint/no-debugger": "error",
56
+ "eslint/no-delete-var": "error",
57
+ "eslint/no-dupe-class-members": "error",
58
+ "eslint/no-dupe-else-if": "error",
59
+ "eslint/no-dupe-keys": "error",
60
+ "eslint/no-duplicate-case": "error",
61
+ "eslint/no-empty": "error",
62
+ "eslint/no-empty-character-class": "error",
63
+ "eslint/no-empty-pattern": "error",
64
+ "eslint/no-empty-static-block": "error",
65
+ "eslint/no-eval": "error",
66
+ "eslint/no-ex-assign": "error",
67
+ "eslint/no-extra-bind": "error",
68
+ "eslint/no-extra-boolean-cast": "error",
69
+ "eslint/no-fallthrough": "error",
70
+ "eslint/no-func-assign": "error",
71
+ "eslint/no-global-assign": "error",
72
+ "eslint/no-import-assign": "error",
73
+ "eslint/no-invalid-regexp": "error",
74
+ "eslint/no-irregular-whitespace": "error",
75
+ "eslint/no-label-var": "error",
76
+ "eslint/no-labels": "error",
77
+ "eslint/no-lone-blocks": "error",
78
+ "eslint/no-loss-of-precision": "error",
79
+ "eslint/no-misleading-character-class": "error",
80
+ "eslint/no-new": "error",
81
+ "eslint/no-new-func": "error",
82
+ "eslint/no-new-native-nonconstructor": "error",
83
+ "eslint/no-nonoctal-decimal-escape": "error",
84
+ "eslint/no-obj-calls": "error",
85
+ "eslint/no-param-reassign": "error",
86
+ "eslint/no-plusplus": ["error", { allowForLoopAfterthoughts: true }],
87
+ "eslint/no-promise-executor-return": "error",
88
+ "eslint/no-prototype-builtins": "error",
89
+ "eslint/no-redeclare": "error",
90
+ "eslint/no-regex-spaces": "error",
91
+ "eslint/no-return-assign": "error",
92
+ "eslint/no-script-url": "error",
93
+ "eslint/no-self-assign": "error",
94
+ "eslint/no-self-compare": "error",
95
+ "eslint/no-sequences": "error",
96
+ "eslint/no-setter-return": "error",
97
+ "eslint/no-shadow-restricted-names": "error",
98
+ "eslint/no-sparse-arrays": "error",
99
+ "eslint/no-template-curly-in-string": "error",
100
+ "eslint/no-this-before-super": "error",
101
+ "eslint/no-unassigned-vars": "error",
102
+ "eslint/no-undef": "error",
103
+ "eslint/no-unexpected-multiline": "error",
104
+ "eslint/no-unneeded-ternary": "error",
105
+ "eslint/no-unreachable": "error",
106
+ "eslint/no-unsafe-finally": "error",
107
+ "eslint/no-unsafe-negation": "error",
108
+ "eslint/no-unsafe-optional-chaining": "error",
109
+ "eslint/no-unused-labels": "error",
110
+ "eslint/no-unused-private-class-members": "error",
111
+ "eslint/no-unused-vars": ["error", { fix: { imports: "safe-fix" } }],
112
+ "eslint/no-useless-assignment": "error",
113
+ "eslint/no-useless-backreference": "error",
114
+ "eslint/no-useless-call": "error",
115
+ "eslint/no-useless-catch": "error",
116
+ "eslint/no-useless-computed-key": "error",
117
+ "eslint/no-useless-concat": "error",
118
+ "eslint/no-useless-escape": "error",
119
+ "eslint/no-useless-rename": "error",
120
+ "eslint/no-useless-return": "error",
121
+ "eslint/no-var": "error",
122
+ "eslint/no-void": ["error", { allowAsStatement: true }],
123
+ "eslint/no-with": "error",
124
+ "eslint/prefer-object-has-own": "error",
125
+ "eslint/prefer-object-spread": "error",
126
+ "eslint/prefer-template": "error",
127
+ "eslint/preserve-caught-error": "error",
128
+ "eslint/require-yield": "error",
129
+ "eslint/symbol-description": "error",
130
+ "eslint/use-isnan": "error",
131
+ "eslint/valid-typeof": "error"
129
132
  }
130
133
  }];
131
134
  //#endregion
@@ -137,6 +140,7 @@ const importSort = () => [{
137
140
  specifier: "eslint-plugin-simple-import-sort"
138
141
  }],
139
142
  rules: {
143
+ "import-sort/exports": "error",
140
144
  "import-sort/imports": ["error", { groups: [
141
145
  ["^\\u0000"],
142
146
  [
@@ -154,8 +158,7 @@ const importSort = () => [{
154
158
  "^[^.]"
155
159
  ],
156
160
  ["^\\.\\.", "^\\."]
157
- ] }],
158
- "import-sort/exports": "error"
161
+ ] }]
159
162
  }
160
163
  }];
161
164
  //#endregion
@@ -168,6 +171,7 @@ const imports = () => [{
168
171
  "import/default": "error",
169
172
  "import/export": "error",
170
173
  "import/first": "error",
174
+ "import/named": "off",
171
175
  "import/namespace": "error",
172
176
  "import/newline-after-import": ["error", { count: 1 }],
173
177
  "import/no-absolute-path": "error",
@@ -178,6 +182,8 @@ const imports = () => [{
178
182
  "import/no-dynamic-require": "error",
179
183
  "import/no-empty-named-blocks": "error",
180
184
  "import/no-mutable-exports": "error",
185
+ "import/no-named-as-default": "off",
186
+ "import/no-named-as-default-member": "off",
181
187
  "import/no-named-default": "error",
182
188
  "import/no-self-import": "error",
183
189
  "import/no-webpack-loader-syntax": "error"
@@ -189,16 +195,8 @@ const jsdoc = () => [{
189
195
  files: [GLOB_SRC],
190
196
  plugins: ["jsdoc"],
191
197
  rules: {
192
- "jsdoc/check-property-names": "off",
193
198
  "jsdoc/check-tag-names": "error",
194
- "jsdoc/empty-tags": "error",
195
- "jsdoc/implements-on-classes": "off",
196
- "jsdoc/no-defaults": "off",
197
- "jsdoc/require-property": "off",
198
- "jsdoc/require-property-description": "off",
199
- "jsdoc/require-property-name": "off",
200
- "jsdoc/require-property-type": "off",
201
- "jsdoc/require-yields": "off"
199
+ "jsdoc/empty-tags": "error"
202
200
  }
203
201
  }];
204
202
  //#endregion
@@ -208,6 +206,7 @@ const jsxA11y = () => [{
208
206
  plugins: ["jsx-a11y"],
209
207
  rules: {
210
208
  "jsx-a11y/alt-text": "error",
209
+ "jsx-a11y/anchor-ambiguous-text": "off",
211
210
  "jsx-a11y/anchor-has-content": "error",
212
211
  "jsx-a11y/anchor-is-valid": ["error", {
213
212
  components: ["Link"],
@@ -225,7 +224,29 @@ const jsxA11y = () => [{
225
224
  "jsx-a11y/aria-unsupported-elements": "error",
226
225
  "jsx-a11y/autocomplete-valid": "error",
227
226
  "jsx-a11y/click-events-have-key-events": "error",
228
- "jsx-a11y/control-has-associated-label": "off",
227
+ "jsx-a11y/control-has-associated-label": ["off", {
228
+ ignoreElements: [
229
+ "audio",
230
+ "canvas",
231
+ "embed",
232
+ "input",
233
+ "textarea",
234
+ "tr",
235
+ "video"
236
+ ],
237
+ ignoreRoles: [
238
+ "grid",
239
+ "listbox",
240
+ "menu",
241
+ "menubar",
242
+ "radiogroup",
243
+ "row",
244
+ "tablist",
245
+ "toolbar",
246
+ "tree",
247
+ "treegrid"
248
+ ]
249
+ }],
229
250
  "jsx-a11y/heading-has-content": "error",
230
251
  "jsx-a11y/html-has-lang": "error",
231
252
  "jsx-a11y/iframe-has-title": "error",
@@ -325,7 +346,6 @@ const jsxA11y = () => [{
325
346
  "onKeyUp"
326
347
  ]
327
348
  }],
328
- "jsx-a11y/prefer-tag-over-role": "off",
329
349
  "jsx-a11y/role-has-required-aria-props": "error",
330
350
  "jsx-a11y/role-supports-aria-props": "error",
331
351
  "jsx-a11y/scope": "error",
@@ -393,791 +413,77 @@ const oxc = () => [{
393
413
  files: [GLOB_SRC],
394
414
  plugins: ["oxc"],
395
415
  rules: {
396
- "approx-constant": "error",
397
- "bad-array-method-on-arguments": "error",
398
- "bad-bitwise-operator": "error",
399
- "bad-char-at-comparison": "error",
400
- "bad-comparison-sequence": "error",
401
- "bad-min-max-func": "error",
402
- "bad-object-literal-comparison": "error",
403
- "bad-replace-all-arg": "error",
404
- "const-comparisons": "error",
405
- "double-comparisons": "error",
406
- "erasing-op": "error",
407
- "misrefactored-assign-op": "error",
408
- "missing-throw": "error",
409
- "no-accumulating-spread": "error",
410
- "no-async-endpoint-handlers": "error",
411
- "no-barrel-file": "error",
412
- "no-const-enum": "error",
413
- "no-this-in-exported-function": "error",
414
- "number-arg-out-of-range": "error",
415
- "only-used-in-recursion": "error",
416
- "uninvoked-array-callback": "error"
416
+ "oxc/approx-constant": "error",
417
+ "oxc/bad-array-method-on-arguments": "error",
418
+ "oxc/bad-bitwise-operator": "error",
419
+ "oxc/bad-char-at-comparison": "error",
420
+ "oxc/bad-comparison-sequence": "error",
421
+ "oxc/bad-min-max-func": "error",
422
+ "oxc/bad-object-literal-comparison": "error",
423
+ "oxc/bad-replace-all-arg": "error",
424
+ "oxc/const-comparisons": "error",
425
+ "oxc/double-comparisons": "error",
426
+ "oxc/erasing-op": "error",
427
+ "oxc/misrefactored-assign-op": "error",
428
+ "oxc/missing-throw": "error",
429
+ "oxc/no-accumulating-spread": "error",
430
+ "oxc/no-async-endpoint-handlers": "error",
431
+ "oxc/no-barrel-file": "error",
432
+ "oxc/no-const-enum": "error",
433
+ "oxc/no-this-in-exported-function": "error",
434
+ "oxc/number-arg-out-of-range": "error",
435
+ "oxc/only-used-in-recursion": "error",
436
+ "oxc/uninvoked-array-callback": "error"
417
437
  }
418
438
  }];
419
439
  //#endregion
420
- //#region src/generated/plugin-snapshots.ts
421
- const reactHooksRecommendedLatestRules = {
422
- "react-hooks/rules-of-hooks": "error",
423
- "react-hooks/exhaustive-deps": "warn",
424
- "react-hooks/static-components": "error",
425
- "react-hooks/use-memo": "error",
426
- "react-hooks/void-use-memo": "error",
427
- "react-hooks/preserve-manual-memoization": "error",
428
- "react-hooks/incompatible-library": "warn",
429
- "react-hooks/immutability": "error",
430
- "react-hooks/globals": "error",
431
- "react-hooks/refs": "error",
432
- "react-hooks/set-state-in-effect": "error",
433
- "react-hooks/error-boundaries": "error",
434
- "react-hooks/purity": "error",
435
- "react-hooks/set-state-in-render": "error",
436
- "react-hooks/unsupported-syntax": "warn",
437
- "react-hooks/config": "error",
438
- "react-hooks/gating": "error"
439
- };
440
- const reactAllRules = {
441
- "@eslint-react/component-hook-factories": "error",
442
- "@eslint-react/error-boundaries": "error",
443
- "@eslint-react/exhaustive-deps": "warn",
444
- "@eslint-react/immutability": "error",
445
- "@eslint-react/no-access-state-in-setstate": "error",
446
- "@eslint-react/no-array-index-key": "warn",
447
- "@eslint-react/no-children-count": "warn",
448
- "@eslint-react/no-children-for-each": "warn",
449
- "@eslint-react/no-children-map": "warn",
450
- "@eslint-react/no-children-only": "warn",
451
- "@eslint-react/no-children-to-array": "warn",
452
- "@eslint-react/no-class-component": "warn",
453
- "@eslint-react/no-clone-element": "warn",
454
- "@eslint-react/no-component-will-mount": "error",
455
- "@eslint-react/no-component-will-receive-props": "error",
456
- "@eslint-react/no-component-will-update": "error",
457
- "@eslint-react/no-context-provider": "warn",
458
- "@eslint-react/no-create-ref": "error",
459
- "@eslint-react/no-direct-mutation-state": "error",
460
- "@eslint-react/no-duplicate-key": "error",
461
- "@eslint-react/no-forward-ref": "warn",
462
- "@eslint-react/no-missing-component-display-name": "warn",
463
- "@eslint-react/no-missing-context-display-name": "warn",
464
- "@eslint-react/no-missing-key": "error",
465
- "@eslint-react/no-misused-capture-owner-stack": "error",
466
- "@eslint-react/no-nested-component-definitions": "error",
467
- "@eslint-react/no-nested-lazy-component-declarations": "error",
468
- "@eslint-react/no-redundant-should-component-update": "error",
469
- "@eslint-react/no-set-state-in-component-did-mount": "warn",
470
- "@eslint-react/no-set-state-in-component-did-update": "warn",
471
- "@eslint-react/no-set-state-in-component-will-update": "warn",
472
- "@eslint-react/no-unnecessary-use-callback": "warn",
473
- "@eslint-react/no-unnecessary-use-memo": "warn",
474
- "@eslint-react/no-unnecessary-use-prefix": "warn",
475
- "@eslint-react/no-unsafe-component-will-mount": "warn",
476
- "@eslint-react/no-unsafe-component-will-receive-props": "warn",
477
- "@eslint-react/no-unsafe-component-will-update": "warn",
478
- "@eslint-react/no-unstable-context-value": "warn",
479
- "@eslint-react/no-unstable-default-props": "warn",
480
- "@eslint-react/no-unused-class-component-members": "warn",
481
- "@eslint-react/no-unused-state": "warn",
482
- "@eslint-react/no-use-context": "warn",
483
- "@eslint-react/prefer-destructuring-assignment": "warn",
484
- "@eslint-react/prefer-namespace-import": "warn",
485
- "@eslint-react/purity": "warn",
486
- "@eslint-react/refs": "error",
487
- "@eslint-react/rules-of-hooks": "error",
488
- "@eslint-react/set-state-in-effect": "warn",
489
- "@eslint-react/set-state-in-render": "error",
490
- "@eslint-react/unsupported-syntax": "error",
491
- "@eslint-react/use-memo": "error",
492
- "@eslint-react/use-state": "warn",
493
- "@eslint-react/jsx-no-children-prop": "warn",
494
- "@eslint-react/jsx-no-children-prop-with-children": "error",
495
- "@eslint-react/jsx-no-comment-textnodes": "warn",
496
- "@eslint-react/jsx-no-deoptimization": "error",
497
- "@eslint-react/jsx-no-namespace": "error",
498
- "@eslint-react/jsx-no-useless-fragment": "warn",
499
- "@eslint-react/rsc-function-definition": "error",
500
- "@eslint-react/dom-no-dangerously-set-innerhtml": "warn",
501
- "@eslint-react/dom-no-dangerously-set-innerhtml-with-children": "error",
502
- "@eslint-react/dom-no-find-dom-node": "error",
503
- "@eslint-react/dom-no-flush-sync": "error",
504
- "@eslint-react/dom-no-hydrate": "error",
505
- "@eslint-react/dom-no-missing-button-type": "warn",
506
- "@eslint-react/dom-no-missing-iframe-sandbox": "warn",
507
- "@eslint-react/dom-no-render": "error",
508
- "@eslint-react/dom-no-render-return-value": "error",
509
- "@eslint-react/dom-no-script-url": "warn",
510
- "@eslint-react/dom-no-string-style-prop": "error",
511
- "@eslint-react/dom-no-unknown-property": "warn",
512
- "@eslint-react/dom-no-unsafe-iframe-sandbox": "warn",
513
- "@eslint-react/dom-no-unsafe-target-blank": "warn",
514
- "@eslint-react/dom-no-use-form-state": "warn",
515
- "@eslint-react/dom-no-void-elements-with-children": "error",
516
- "@eslint-react/dom-prefer-namespace-import": "warn",
517
- "@eslint-react/web-api-no-leaked-event-listener": "warn",
518
- "@eslint-react/web-api-no-leaked-interval": "warn",
519
- "@eslint-react/web-api-no-leaked-resize-observer": "warn",
520
- "@eslint-react/web-api-no-leaked-timeout": "warn",
521
- "@eslint-react/naming-convention-context-name": "warn",
522
- "@eslint-react/naming-convention-id-name": "warn",
523
- "@eslint-react/naming-convention-ref-name": "warn"
524
- };
525
- const reactDisableConflictReactHooksRules = {
526
- "react-hooks/exhaustive-deps": "off",
527
- "react-hooks/rules-of-hooks": "off",
528
- "react-hooks/component-hook-factories": "off",
529
- "react-hooks/error-boundaries": "off",
530
- "react-hooks/immutability": "off",
531
- "react-hooks/purity": "off",
532
- "react-hooks/refs": "off",
533
- "react-hooks/set-state-in-effect": "off",
534
- "react-hooks/set-state-in-render": "off",
535
- "react-hooks/static-components": "off",
536
- "react-hooks/unsupported-syntax": "off",
537
- "react-hooks/use-memo": "off"
538
- };
539
- const playwrightRecommendedRules = {
540
- "no-empty-pattern": "off",
541
- "playwright/consistent-spacing-between-blocks": "warn",
542
- "playwright/expect-expect": "warn",
543
- "playwright/max-nested-describe": "warn",
544
- "playwright/missing-playwright-await": "error",
545
- "playwright/no-conditional-expect": "warn",
546
- "playwright/no-conditional-in-test": "warn",
547
- "playwright/no-duplicate-hooks": "warn",
548
- "playwright/no-duplicate-slow": "warn",
549
- "playwright/no-element-handle": "warn",
550
- "playwright/no-eval": "warn",
551
- "playwright/no-focused-test": "error",
552
- "playwright/no-force-option": "warn",
553
- "playwright/no-nested-step": "warn",
554
- "playwright/no-networkidle": "error",
555
- "playwright/no-page-pause": "warn",
556
- "playwright/no-skipped-test": "warn",
557
- "playwright/no-standalone-expect": "error",
558
- "playwright/no-unsafe-references": "error",
559
- "playwright/no-unused-locators": "error",
560
- "playwright/no-useless-await": "warn",
561
- "playwright/no-useless-not": "warn",
562
- "playwright/no-wait-for-navigation": "error",
563
- "playwright/no-wait-for-selector": "warn",
564
- "playwright/no-wait-for-timeout": "warn",
565
- "playwright/prefer-hooks-in-order": "warn",
566
- "playwright/prefer-hooks-on-top": "warn",
567
- "playwright/prefer-locator": "warn",
568
- "playwright/prefer-to-have-count": "warn",
569
- "playwright/prefer-to-have-length": "warn",
570
- "playwright/prefer-web-first-assertions": "error",
571
- "playwright/valid-describe-callback": "error",
572
- "playwright/valid-expect": "error",
573
- "playwright/valid-expect-in-promise": "error",
574
- "playwright/valid-test-tags": "error",
575
- "playwright/valid-title": "error"
576
- };
577
- const regexpRecommendedRules = {
578
- "no-control-regex": "error",
579
- "no-misleading-character-class": "error",
580
- "no-regex-spaces": "error",
581
- "prefer-regex-literals": "error",
582
- "no-invalid-regexp": "off",
583
- "no-useless-backreference": "off",
584
- "no-empty-character-class": "off",
585
- "regexp/confusing-quantifier": "warn",
586
- "regexp/control-character-escape": "error",
587
- "regexp/match-any": "error",
588
- "regexp/negation": "error",
589
- "regexp/no-contradiction-with-assertion": "error",
590
- "regexp/no-dupe-characters-character-class": "error",
591
- "regexp/no-dupe-disjunctions": "error",
592
- "regexp/no-empty-alternative": "warn",
593
- "regexp/no-empty-capturing-group": "error",
594
- "regexp/no-empty-character-class": "error",
595
- "regexp/no-empty-group": "error",
596
- "regexp/no-empty-lookarounds-assertion": "error",
597
- "regexp/no-empty-string-literal": "error",
598
- "regexp/no-escape-backspace": "error",
599
- "regexp/no-extra-lookaround-assertions": "error",
600
- "regexp/no-invalid-regexp": "error",
601
- "regexp/no-invisible-character": "error",
602
- "regexp/no-lazy-ends": "warn",
603
- "regexp/no-legacy-features": "error",
604
- "regexp/no-misleading-capturing-group": "error",
605
- "regexp/no-misleading-unicode-character": "error",
606
- "regexp/no-missing-g-flag": "error",
607
- "regexp/no-non-standard-flag": "error",
608
- "regexp/no-obscure-range": "error",
609
- "regexp/no-optional-assertion": "error",
610
- "regexp/no-potentially-useless-backreference": "warn",
611
- "regexp/no-super-linear-backtracking": "error",
612
- "regexp/no-trivially-nested-assertion": "error",
613
- "regexp/no-trivially-nested-quantifier": "error",
614
- "regexp/no-unused-capturing-group": "error",
615
- "regexp/no-useless-assertions": "error",
616
- "regexp/no-useless-backreference": "error",
617
- "regexp/no-useless-character-class": "error",
618
- "regexp/no-useless-dollar-replacements": "error",
619
- "regexp/no-useless-escape": "error",
620
- "regexp/no-useless-flag": "warn",
621
- "regexp/no-useless-lazy": "error",
622
- "regexp/no-useless-non-capturing-group": "error",
623
- "regexp/no-useless-quantifier": "error",
624
- "regexp/no-useless-range": "error",
625
- "regexp/no-useless-set-operand": "error",
626
- "regexp/no-useless-string-literal": "error",
627
- "regexp/no-useless-two-nums-quantifier": "error",
628
- "regexp/no-zero-quantifier": "error",
629
- "regexp/optimal-lookaround-quantifier": "warn",
630
- "regexp/optimal-quantifier-concatenation": "error",
631
- "regexp/prefer-character-class": "error",
632
- "regexp/prefer-d": "error",
633
- "regexp/prefer-plus-quantifier": "error",
634
- "regexp/prefer-predefined-assertion": "error",
635
- "regexp/prefer-question-quantifier": "error",
636
- "regexp/prefer-range": "error",
637
- "regexp/prefer-set-operation": "error",
638
- "regexp/prefer-star-quantifier": "error",
639
- "regexp/prefer-unicode-codepoint-escapes": "error",
640
- "regexp/prefer-w": "error",
641
- "regexp/simplify-set-operations": "error",
642
- "regexp/sort-flags": "error",
643
- "regexp/strict": "error",
644
- "regexp/use-ignore-case": "error"
645
- };
646
- const sonarjsRecommendedRules = {
647
- "sonarjs/function-name": "off",
648
- "sonarjs/class-name": "error",
649
- "sonarjs/max-lines": "off",
650
- "sonarjs/no-tab": "off",
651
- "sonarjs/variable-name": "off",
652
- "sonarjs/comment-regex": "off",
653
- "sonarjs/no-commented-code": "off",
654
- "sonarjs/elseif-without-else": "off",
655
- "sonarjs/no-fallthrough": "error",
656
- "sonarjs/nested-control-flow": "off",
657
- "sonarjs/too-many-break-or-continue-in-loop": "off",
658
- "sonarjs/max-lines-per-function": "off",
659
- "sonarjs/no-nested-incdec": "off",
660
- "sonarjs/no-equals-in-for-termination": "error",
661
- "sonarjs/no-extra-arguments": "error",
662
- "sonarjs/no-collapsible-if": "off",
663
- "sonarjs/expression-complexity": "off",
664
- "sonarjs/no-redundant-parentheses": "off",
665
- "sonarjs/no-labels": "error",
666
- "sonarjs/no-nested-assignment": "error",
667
- "sonarjs/no-redundant-boolean": "error",
668
- "sonarjs/prefer-single-boolean-return": "error",
669
- "sonarjs/unused-import": "error",
670
- "sonarjs/fixme-tag": "error",
671
- "sonarjs/todo-tag": "error",
672
- "sonarjs/useless-string-operation": "off",
673
- "sonarjs/no-unused-function-argument": "off",
674
- "sonarjs/no-duplicate-string": "off",
675
- "sonarjs/no-case-label-in-switch": "error",
676
- "sonarjs/no-parameter-reassignment": "error",
677
- "sonarjs/no-floating-point-equality": "error",
678
- "sonarjs/prefer-while": "error",
679
- "sonarjs/no-sonar-comments": "off",
680
- "sonarjs/no-small-switch": "error",
681
- "sonarjs/no-hardcoded-ip": "error",
682
- "sonarjs/label-position": "error",
683
- "sonarjs/public-static-readonly": "error",
684
- "sonarjs/file-header": "off",
685
- "sonarjs/call-argument-line": "error",
686
- "sonarjs/max-switch-cases": "error",
687
- "sonarjs/no-unused-vars": "error",
688
- "sonarjs/prefer-immediate-return": "off",
689
- "sonarjs/function-inside-loop": "error",
690
- "sonarjs/code-eval": "error",
691
- "sonarjs/no-variable-usage-before-declaration": "off",
692
- "sonarjs/future-reserved-words": "error",
693
- "sonarjs/array-constructor": "off",
694
- "sonarjs/bitwise-operators": "error",
695
- "sonarjs/no-function-declaration-in-block": "off",
696
- "sonarjs/no-primitive-wrappers": "error",
697
- "sonarjs/for-in": "off",
698
- "sonarjs/cyclomatic-complexity": "off",
699
- "sonarjs/no-skipped-tests": "error",
700
- "sonarjs/no-identical-expressions": "error",
701
- "sonarjs/no-nested-switch": "off",
702
- "sonarjs/constructor-for-side-effects": "error",
703
- "sonarjs/no-dead-store": "error",
704
- "sonarjs/no-identical-conditions": "error",
705
- "sonarjs/no-duplicated-branches": "error",
706
- "sonarjs/deprecation": "error",
707
- "sonarjs/no-inverted-boolean-check": "error",
708
- "sonarjs/misplaced-loop-counter": "error",
709
- "sonarjs/no-nested-functions": "error",
710
- "sonarjs/no-hardcoded-passwords": "error",
711
- "sonarjs/sql-queries": "error",
712
- "sonarjs/insecure-cookie": "error",
713
- "sonarjs/no-useless-increment": "error",
714
- "sonarjs/no-globals-shadowing": "error",
715
- "sonarjs/no-undefined-assignment": "off",
716
- "sonarjs/no-empty-test-file": "error",
717
- "sonarjs/no-ignored-return": "error",
718
- "sonarjs/no-wildcard-import": "off",
719
- "sonarjs/arguments-order": "error",
720
- "sonarjs/pseudo-random": "error",
721
- "sonarjs/for-loop-increment-sign": "error",
722
- "sonarjs/null-dereference": "error",
723
- "sonarjs/no-selector-parameter": "error",
724
- "sonarjs/updated-loop-counter": "error",
725
- "sonarjs/block-scoped-var": "error",
726
- "sonarjs/no-built-in-override": "off",
727
- "sonarjs/prefer-object-literal": "off",
728
- "sonarjs/no-ignored-exceptions": "error",
729
- "sonarjs/no-gratuitous-expressions": "error",
730
- "sonarjs/file-uploads": "error",
731
- "sonarjs/file-permissions": "error",
732
- "sonarjs/no-empty-character-class": "error",
733
- "sonarjs/no-unenclosed-multiline-block": "error",
734
- "sonarjs/index-of-compare-to-positive-number": "error",
735
- "sonarjs/assertions-in-tests": "error",
736
- "sonarjs/no-implicit-global": "error",
737
- "sonarjs/no-useless-catch": "error",
738
- "sonarjs/xml-parser-xxe": "error",
739
- "sonarjs/non-existent-operator": "error",
740
- "sonarjs/web-sql-database": "off",
741
- "sonarjs/post-message": "error",
742
- "sonarjs/no-array-delete": "error",
743
- "sonarjs/no-alphabetical-sort": "error",
744
- "sonarjs/no-incomplete-assertions": "error",
745
- "sonarjs/no-global-this": "error",
746
- "sonarjs/new-operator-misuse": "error",
747
- "sonarjs/no-delete-var": "error",
748
- "sonarjs/strings-comparison": "off",
749
- "sonarjs/file-name-differ-from-class": "off",
750
- "sonarjs/cookie-no-httponly": "error",
751
- "sonarjs/no-nested-conditional": "error",
752
- "sonarjs/no-incorrect-string-concat": "off",
753
- "sonarjs/different-types-comparison": "error",
754
- "sonarjs/inverted-assertion-arguments": "error",
755
- "sonarjs/shorthand-property-grouping": "off",
756
- "sonarjs/updated-const-var": "error",
757
- "sonarjs/arguments-usage": "off",
758
- "sonarjs/destructuring-assignment-syntax": "off",
759
- "sonarjs/no-invariant-returns": "error",
760
- "sonarjs/arrow-function-convention": "off",
761
- "sonarjs/class-prototype": "off",
762
- "sonarjs/generator-without-yield": "error",
763
- "sonarjs/no-require-or-define": "off",
764
- "sonarjs/no-associative-arrays": "error",
765
- "sonarjs/comma-or-logical-or-case": "error",
766
- "sonarjs/no-redundant-jump": "error",
767
- "sonarjs/inconsistent-function-call": "error",
768
- "sonarjs/no-use-of-empty-return-value": "error",
769
- "sonarjs/void-use": "error",
770
- "sonarjs/operation-returning-nan": "off",
771
- "sonarjs/values-not-convertible-to-numbers": "off",
772
- "sonarjs/non-number-in-arithmetic-expression": "off",
773
- "sonarjs/cognitive-complexity": "error",
774
- "sonarjs/argument-type": "error",
775
- "sonarjs/in-operator-type-error": "error",
776
- "sonarjs/array-callback-without-return": "error",
777
- "sonarjs/declarations-in-global-scope": "off",
778
- "sonarjs/function-return-type": "error",
779
- "sonarjs/no-inconsistent-returns": "off",
780
- "sonarjs/no-reference-error": "off",
781
- "sonarjs/no-all-duplicated-branches": "error",
782
- "sonarjs/no-same-line-conditional": "error",
783
- "sonarjs/conditional-indentation": "off",
784
- "sonarjs/no-collection-size-mischeck": "error",
785
- "sonarjs/no-unthrown-error": "error",
786
- "sonarjs/no-unused-collection": "error",
787
- "sonarjs/no-os-command-from-path": "error",
788
- "sonarjs/no-misleading-array-reverse": "error",
789
- "sonarjs/no-for-in-iterable": "off",
790
- "sonarjs/no-element-overwrite": "error",
791
- "sonarjs/no-identical-functions": "error",
792
- "sonarjs/no-empty-collection": "error",
793
- "sonarjs/no-redundant-assignments": "error",
794
- "sonarjs/prefer-type-guard": "error",
795
- "sonarjs/use-type-alias": "error",
796
- "sonarjs/no-return-type-any": "off",
797
- "sonarjs/no-implicit-dependencies": "off",
798
- "sonarjs/no-useless-intersection": "error",
799
- "sonarjs/weak-ssl": "error",
800
- "sonarjs/no-weak-keys": "error",
801
- "sonarjs/csrf": "error",
802
- "sonarjs/production-debug": "error",
803
- "sonarjs/prefer-default-last": "error",
804
- "sonarjs/no-in-misuse": "error",
805
- "sonarjs/no-duplicate-in-composite": "error",
806
- "sonarjs/max-union-size": "off",
807
- "sonarjs/no-undefined-argument": "error",
808
- "sonarjs/no-nested-template-literals": "error",
809
- "sonarjs/prefer-promise-shorthand": "error",
810
- "sonarjs/os-command": "off",
811
- "sonarjs/no-redundant-optional": "error",
812
- "sonarjs/hashing": "error",
813
- "sonarjs/bool-param-default": "off",
814
- "sonarjs/no-try-promise": "error",
815
- "sonarjs/unverified-certificate": "error",
816
- "sonarjs/no-unsafe-unzip": "off",
817
- "sonarjs/cors": "error",
818
- "sonarjs/link-with-target-blank": "error",
819
- "sonarjs/disabled-auto-escaping": "error",
820
- "sonarjs/table-header": "error",
821
- "sonarjs/no-table-as-layout": "error",
822
- "sonarjs/table-header-reference": "error",
823
- "sonarjs/object-alt-content": "error",
824
- "sonarjs/no-clear-text-protocols": "error",
825
- "sonarjs/publicly-writable-directories": "error",
826
- "sonarjs/unverified-hostname": "error",
827
- "sonarjs/encryption-secure-mode": "error",
828
- "sonarjs/no-weak-cipher": "error",
829
- "sonarjs/no-intrusive-permissions": "off",
830
- "sonarjs/insecure-jwt-token": "error",
831
- "sonarjs/x-powered-by": "error",
832
- "sonarjs/hidden-files": "off",
833
- "sonarjs/content-length": "error",
834
- "sonarjs/disabled-resource-integrity": "error",
835
- "sonarjs/content-security-policy": "error",
836
- "sonarjs/no-mixed-content": "off",
837
- "sonarjs/frame-ancestors": "off",
838
- "sonarjs/no-mime-sniff": "error",
839
- "sonarjs/no-referrer-policy": "error",
840
- "sonarjs/strict-transport-security": "error",
841
- "sonarjs/confidential-information-logging": "off",
842
- "sonarjs/no-ip-forward": "off",
843
- "sonarjs/empty-string-repetition": "error",
844
- "sonarjs/regex-complexity": "error",
845
- "sonarjs/no-incompatible-assertion-types": "error",
846
- "sonarjs/anchor-precedence": "error",
847
- "sonarjs/slow-regex": "error",
848
- "sonarjs/no-invalid-regexp": "error",
849
- "sonarjs/unused-named-groups": "error",
850
- "sonarjs/no-same-argument-assert": "error",
851
- "sonarjs/unicode-aware-regex": "off",
852
- "sonarjs/no-misleading-character-class": "error",
853
- "sonarjs/duplicates-in-character-class": "error",
854
- "sonarjs/session-regeneration": "error",
855
- "sonarjs/prefer-specific-assertions": "error",
856
- "sonarjs/no-trivial-assertions": "error",
857
- "sonarjs/test-check-exception": "error",
858
- "sonarjs/stable-tests": "error",
859
- "sonarjs/no-empty-after-reluctant": "error",
860
- "sonarjs/single-character-alternation": "error",
861
- "sonarjs/no-code-after-done": "error",
862
- "sonarjs/disabled-timeout": "error",
863
- "sonarjs/chai-determinate-assertion": "error",
864
- "sonarjs/aws-s3-bucket-insecure-http": "error",
865
- "sonarjs/aws-s3-bucket-versioning": "error",
866
- "sonarjs/aws-s3-bucket-granted-access": "error",
867
- "sonarjs/no-angular-bypass-sanitization": "error",
868
- "sonarjs/aws-iam-public-access": "error",
869
- "sonarjs/aws-ec2-unencrypted-ebs-volume": "error",
870
- "sonarjs/aws-s3-bucket-public-access": "error",
871
- "sonarjs/aws-iam-all-privileges": "error",
872
- "sonarjs/aws-rds-unencrypted-databases": "error",
873
- "sonarjs/aws-iam-all-resources-accessible": "off",
874
- "sonarjs/aws-opensearchservice-domain": "error",
875
- "sonarjs/aws-iam-privilege-escalation": "error",
876
- "sonarjs/aws-sagemaker-unencrypted-notebook": "error",
877
- "sonarjs/aws-restricted-ip-admin-access": "error",
878
- "sonarjs/no-empty-alternatives": "error",
879
- "sonarjs/no-control-regex": "error",
880
- "sonarjs/no-regex-spaces": "error",
881
- "sonarjs/aws-sns-unencrypted-topics": "error",
882
- "sonarjs/existing-groups": "error",
883
- "sonarjs/aws-ec2-rds-dms-public": "error",
884
- "sonarjs/aws-sqs-unencrypted-queue": "error",
885
- "sonarjs/no-empty-group": "error",
886
- "sonarjs/aws-efs-unencrypted": "error",
887
- "sonarjs/aws-apigateway-public-api": "error",
888
- "sonarjs/stateful-regex": "error",
889
- "sonarjs/concise-regex": "error",
890
- "sonarjs/single-char-in-character-classes": "error",
891
- "sonarjs/no-hardcoded-secrets": "error",
892
- "sonarjs/no-exclusive-tests": "error",
893
- "sonarjs/hardcoded-secret-signatures": "error",
894
- "sonarjs/jsx-no-leaked-render": "error",
895
- "sonarjs/no-hook-setter-in-body": "error",
896
- "sonarjs/no-useless-react-setstate": "error",
897
- "sonarjs/no-uniq-key": "error",
898
- "sonarjs/redundant-type-aliases": "error",
899
- "sonarjs/prefer-regexp-exec": "error",
900
- "sonarjs/no-internal-api-use": "error",
901
- "sonarjs/prefer-read-only-props": "error",
902
- "sonarjs/no-literal-call": "error",
903
- "sonarjs/reduce-initial-value": "error",
904
- "sonarjs/no-async-constructor": "error",
905
- "sonarjs/review-blockchain-mnemonic": "error",
906
- "sonarjs/dynamically-constructed-templates": "error",
907
- "sonarjs/no-session-cookies-on-static-assets": "error",
908
- "sonarjs/dompurify-unsafe-config": "error",
909
- "sonarjs/no-duplicate-test-title": "error",
910
- "sonarjs/async-test-assertions": "error",
911
- "sonarjs/no-empty-test-title": "error",
912
- "sonarjs/hooks-before-test-cases": "error",
913
- "sonarjs/no-forced-browser-interaction": "error",
914
- "sonarjs/super-linear-regex": "error"
915
- };
916
- const betterTailwindcssDefaultSelectors = [
917
- {
918
- kind: "attribute",
919
- name: "^class(?:Name)?$"
920
- },
921
- {
922
- kind: "attribute",
923
- match: [{ type: "strings" }],
924
- name: "^class(?:Name)?$"
925
- },
926
- {
927
- kind: "attribute",
928
- match: [{ type: "strings" }],
929
- name: "^class:.*$"
930
- },
931
- {
932
- kind: "attribute",
933
- name: "(?:^\\[class\\]$)|(?:^\\[ngClass\\]$)"
934
- },
935
- {
936
- kind: "attribute",
937
- match: [{ type: "strings" }],
938
- name: "(?:^\\[class\\..*\\]$)"
939
- },
940
- {
941
- kind: "attribute",
942
- match: [{ type: "strings" }, { type: "objectKeys" }],
943
- name: "(?:^\\[class\\]$)|(?:^\\[ngClass\\]$)"
944
- },
945
- {
946
- kind: "attribute",
947
- match: [{ type: "strings" }, { type: "objectKeys" }],
948
- name: "^v-bind:class$"
949
- },
950
- {
951
- kind: "attribute",
952
- match: [{ type: "strings" }, { type: "objectKeys" }],
953
- name: "^class:list$"
954
- },
955
- {
956
- kind: "attribute",
957
- match: [{ type: "objectKeys" }],
958
- name: "^classList$"
959
- },
960
- {
961
- kind: "callee",
962
- match: [{ type: "strings" }],
963
- name: "^cc$"
964
- },
965
- {
966
- kind: "callee",
967
- match: [{ type: "objectKeys" }],
968
- name: "^cc$"
969
- },
970
- {
971
- kind: "callee",
972
- match: [{
973
- path: "^base$",
974
- type: "objectValues"
975
- }],
976
- name: "^clb$"
977
- },
978
- {
979
- kind: "callee",
980
- match: [{
981
- path: "^variants.*$",
982
- type: "objectValues"
983
- }],
984
- name: "^clb$"
985
- },
986
- {
987
- kind: "callee",
988
- match: [{
989
- path: "^compoundVariants\\[\\d+\\]\\.classes$",
990
- type: "objectValues"
991
- }],
992
- name: "^clb$"
993
- },
994
- {
995
- kind: "callee",
996
- match: [{ type: "strings" }],
997
- name: "^clsx$"
998
- },
999
- {
1000
- kind: "callee",
1001
- match: [{ type: "objectKeys" }],
1002
- name: "^clsx$"
1003
- },
1004
- {
1005
- kind: "callee",
1006
- match: [{ type: "strings" }],
1007
- name: "^cn$"
1008
- },
1009
- {
1010
- kind: "callee",
1011
- match: [{ type: "objectKeys" }],
1012
- name: "^cn$"
1013
- },
1014
- {
1015
- kind: "callee",
1016
- match: [{ type: "strings" }],
1017
- name: "^cnb$"
1018
- },
1019
- {
1020
- kind: "callee",
1021
- match: [{ type: "objectKeys" }],
1022
- name: "^cnb$"
1023
- },
1024
- {
1025
- kind: "callee",
1026
- match: [{ type: "strings" }],
1027
- name: "^ctl$"
1028
- },
1029
- {
1030
- kind: "callee",
1031
- match: [{ type: "strings" }],
1032
- name: "^cva$"
1033
- },
1034
- {
1035
- kind: "callee",
1036
- match: [{
1037
- path: "^variants.*$",
1038
- type: "objectValues"
1039
- }],
1040
- name: "^cva$"
1041
- },
1042
- {
1043
- kind: "callee",
1044
- match: [{
1045
- path: "^compoundVariants\\[\\d+\\]\\.(?:className|class)$",
1046
- type: "objectValues"
1047
- }],
1048
- name: "^cva$"
1049
- },
1050
- {
1051
- kind: "callee",
1052
- match: [{ type: "strings" }],
1053
- name: "^cx$"
1054
- },
1055
- {
1056
- kind: "callee",
1057
- match: [{ type: "objectKeys" }],
1058
- name: "^cx$"
1059
- },
1060
- {
1061
- kind: "callee",
1062
- match: [{ type: "strings" }],
1063
- name: "^dcnb$"
1064
- },
1065
- {
1066
- kind: "callee",
1067
- match: [{ type: "objectKeys" }],
1068
- name: "^dcnb$"
1069
- },
1070
- {
1071
- kind: "callee",
1072
- match: [{ type: "objectKeys" }],
1073
- name: "^objstr$"
1074
- },
1075
- {
1076
- kind: "callee",
1077
- match: [{ type: "strings" }],
1078
- name: "^tv$"
1079
- },
1080
- {
1081
- kind: "callee",
1082
- match: [{
1083
- path: "^variants.*$",
1084
- type: "objectValues"
1085
- }],
1086
- name: "^tv$"
1087
- },
1088
- {
1089
- kind: "callee",
1090
- match: [{
1091
- path: "^compoundVariants\\[\\d+\\]\\.(?:className|class).*$",
1092
- type: "objectValues"
1093
- }],
1094
- name: "^tv$"
1095
- },
1096
- {
1097
- kind: "callee",
1098
- match: [{
1099
- path: "^base$",
1100
- type: "objectValues"
1101
- }],
1102
- name: "^tv$"
1103
- },
1104
- {
1105
- kind: "callee",
1106
- match: [{
1107
- path: "^slots.*$",
1108
- type: "objectValues"
1109
- }],
1110
- name: "^tv$"
1111
- },
1112
- {
1113
- kind: "callee",
1114
- match: [{
1115
- path: "^compoundSlots\\[\\d+\\]\\.(?:className|class).*$",
1116
- type: "objectValues"
1117
- }],
1118
- name: "^tv$"
1119
- },
1120
- {
1121
- kind: "callee",
1122
- match: [{ type: "strings" }],
1123
- name: "^twJoin$"
1124
- },
1125
- {
1126
- kind: "callee",
1127
- match: [{ type: "strings" }],
1128
- name: "^twMerge$"
1129
- },
1130
- {
1131
- kind: "variable",
1132
- match: [{ type: "strings" }],
1133
- name: "^classNames?$"
1134
- },
1135
- {
1136
- kind: "variable",
1137
- match: [{ type: "strings" }],
1138
- name: "^classes$"
1139
- },
1140
- {
1141
- kind: "variable",
1142
- match: [{ type: "strings" }],
1143
- name: "^styles?$"
1144
- },
1145
- {
1146
- kind: "tag",
1147
- path: "twc(\\.\\w+)?"
1148
- },
1149
- {
1150
- kind: "callee",
1151
- match: [{ type: "strings" }, {
1152
- match: [{ type: "strings" }],
1153
- type: "anonymousFunctionReturn"
1154
- }],
1155
- path: "^twc\\.\\w+"
1156
- },
1157
- {
1158
- kind: "tag",
1159
- path: "twx(\\.\\w+)?"
1160
- },
1161
- {
1162
- kind: "callee",
1163
- match: [{ type: "strings" }, {
1164
- match: [{ type: "strings" }],
1165
- type: "anonymousFunctionReturn"
1166
- }],
1167
- path: "^twx\\.\\w+"
1168
- }
1169
- ];
1170
- //#endregion
1171
440
  //#region src/configs/playwright.ts
1172
441
  const playwright = (config) => [{
1173
442
  files: config.files,
1174
- jsPlugins: ["eslint-plugin-playwright"],
443
+ jsPlugins: [{
444
+ name: "playwright",
445
+ specifier: "eslint-plugin-playwright"
446
+ }],
1175
447
  rules: {
1176
- ...playwrightRecommendedRules,
448
+ "eslint/no-empty-pattern": "off",
449
+ "playwright/consistent-spacing-between-blocks": "error",
1177
450
  "playwright/expect-expect": ["error", {
1178
451
  assertFunctionNames: config.assertFunctionNames ?? [],
1179
452
  assertFunctionPatterns: config.assertFunctionPatterns ?? []
1180
- }]
453
+ }],
454
+ "playwright/max-nested-describe": "error",
455
+ "playwright/missing-playwright-await": "error",
456
+ "playwright/no-conditional-expect": "error",
457
+ "playwright/no-conditional-in-test": "error",
458
+ "playwright/no-duplicate-hooks": "error",
459
+ "playwright/no-duplicate-slow": "error",
460
+ "playwright/no-element-handle": "error",
461
+ "playwright/no-eval": "error",
462
+ "playwright/no-focused-test": "error",
463
+ "playwright/no-force-option": "error",
464
+ "playwright/no-nested-step": "error",
465
+ "playwright/no-networkidle": "error",
466
+ "playwright/no-page-pause": "error",
467
+ "playwright/no-skipped-test": "error",
468
+ "playwright/no-standalone-expect": "error",
469
+ "playwright/no-unsafe-references": "error",
470
+ "playwright/no-unused-locators": "error",
471
+ "playwright/no-useless-await": "error",
472
+ "playwright/no-useless-not": "error",
473
+ "playwright/no-wait-for-navigation": "error",
474
+ "playwright/no-wait-for-selector": "error",
475
+ "playwright/no-wait-for-timeout": "error",
476
+ "playwright/prefer-hooks-in-order": "error",
477
+ "playwright/prefer-hooks-on-top": "error",
478
+ "playwright/prefer-locator": "error",
479
+ "playwright/prefer-to-have-count": "error",
480
+ "playwright/prefer-to-have-length": "error",
481
+ "playwright/prefer-web-first-assertions": "error",
482
+ "playwright/valid-describe-callback": "error",
483
+ "playwright/valid-expect": "error",
484
+ "playwright/valid-expect-in-promise": "error",
485
+ "playwright/valid-test-tags": "error",
486
+ "playwright/valid-title": "error"
1181
487
  }
1182
488
  }];
1183
489
  //#endregion
@@ -1187,6 +493,7 @@ const promise = () => [{
1187
493
  plugins: ["promise"],
1188
494
  rules: {
1189
495
  "promise/always-return": "error",
496
+ "promise/avoid-new": "off",
1190
497
  "promise/catch-or-return": "error",
1191
498
  "promise/no-callback-in-promise": "error",
1192
499
  "promise/no-multiple-resolved": "error",
@@ -1204,11 +511,6 @@ const promise = () => [{
1204
511
  }
1205
512
  }];
1206
513
  //#endregion
1207
- //#region src/utils.ts
1208
- function remapRuleNames(rules, from, to) {
1209
- return Object.fromEntries(Object.entries(rules).map(([name, value]) => [name.startsWith(from) ? to + name.slice(from.length) : name, value]));
1210
- }
1211
- //#endregion
1212
514
  //#region src/configs/react.ts
1213
515
  const react = () => [{
1214
516
  files: [GLOB_SRC],
@@ -1220,82 +522,535 @@ const react = () => [{
1220
522
  specifier: "eslint-plugin-react-hooks"
1221
523
  }],
1222
524
  rules: {
1223
- ...remapRuleNames(reactHooksRecommendedLatestRules, "react-hooks", "react-hooks-js"),
1224
- ...reactAllRules,
1225
- ...remapRuleNames(reactDisableConflictReactHooksRules, "react-hooks", "react-hooks-js"),
525
+ "@eslint-react/dom-no-dangerously-set-innerhtml": "error",
526
+ "@eslint-react/dom-no-dangerously-set-innerhtml-with-children": "error",
527
+ "@eslint-react/dom-no-find-dom-node": "error",
528
+ "@eslint-react/dom-no-flush-sync": "error",
529
+ "@eslint-react/dom-no-hydrate": "error",
530
+ "@eslint-react/dom-no-missing-button-type": "error",
531
+ "@eslint-react/dom-no-missing-iframe-sandbox": "error",
532
+ "@eslint-react/dom-no-render": "error",
533
+ "@eslint-react/dom-no-render-return-value": "error",
534
+ "@eslint-react/dom-no-script-url": "error",
535
+ "@eslint-react/dom-no-string-style-prop": "error",
536
+ "@eslint-react/dom-no-unknown-property": "error",
537
+ "@eslint-react/dom-no-unsafe-iframe-sandbox": "error",
538
+ "@eslint-react/dom-no-unsafe-target-blank": "error",
539
+ "@eslint-react/dom-no-use-form-state": "error",
540
+ "@eslint-react/dom-no-void-elements-with-children": "error",
541
+ "@eslint-react/error-boundaries": "error",
542
+ "@eslint-react/exhaustive-deps": "error",
543
+ "@eslint-react/globals": "error",
1226
544
  "@eslint-react/immutability": "error",
1227
- "@eslint-react/refs": "error"
545
+ "@eslint-react/jsx-no-children-prop": "error",
546
+ "@eslint-react/jsx-no-children-prop-with-children": "error",
547
+ "@eslint-react/jsx-no-comment-textnodes": "error",
548
+ "@eslint-react/jsx-no-key-after-spread": "error",
549
+ "@eslint-react/jsx-no-leaked-dollar": "error",
550
+ "@eslint-react/jsx-no-leaked-semicolon": "error",
551
+ "@eslint-react/jsx-no-namespace": "error",
552
+ "@eslint-react/jsx-no-useless-fragment": "error",
553
+ "@eslint-react/naming-convention-context-name": "error",
554
+ "@eslint-react/naming-convention-id-name": "error",
555
+ "@eslint-react/naming-convention-ref-name": "error",
556
+ "@eslint-react/no-access-state-in-setstate": "error",
557
+ "@eslint-react/no-array-index-key": "error",
558
+ "@eslint-react/no-children-count": "error",
559
+ "@eslint-react/no-children-for-each": "error",
560
+ "@eslint-react/no-children-map": "error",
561
+ "@eslint-react/no-children-only": "error",
562
+ "@eslint-react/no-children-to-array": "error",
563
+ "@eslint-react/no-class-component": "error",
564
+ "@eslint-react/no-clone-element": "error",
565
+ "@eslint-react/no-component-will-mount": "error",
566
+ "@eslint-react/no-component-will-receive-props": "error",
567
+ "@eslint-react/no-component-will-update": "error",
568
+ "@eslint-react/no-context-provider": "error",
569
+ "@eslint-react/no-create-ref": "error",
570
+ "@eslint-react/no-direct-mutation-state": "error",
571
+ "@eslint-react/no-duplicate-key": "error",
572
+ "@eslint-react/no-forward-ref": "error",
573
+ "@eslint-react/no-missing-component-display-name": "error",
574
+ "@eslint-react/no-missing-context-display-name": "error",
575
+ "@eslint-react/no-missing-key": "error",
576
+ "@eslint-react/no-misused-capture-owner-stack": "error",
577
+ "@eslint-react/no-nested-component-definitions": "error",
578
+ "@eslint-react/no-nested-lazy-component-declarations": "error",
579
+ "@eslint-react/no-set-state-in-component-did-mount": "error",
580
+ "@eslint-react/no-set-state-in-component-did-update": "error",
581
+ "@eslint-react/no-set-state-in-component-will-update": "error",
582
+ "@eslint-react/no-unnecessary-use-prefix": "error",
583
+ "@eslint-react/no-unsafe-component-will-mount": "error",
584
+ "@eslint-react/no-unsafe-component-will-receive-props": "error",
585
+ "@eslint-react/no-unsafe-component-will-update": "error",
586
+ "@eslint-react/no-unstable-context-value": "error",
587
+ "@eslint-react/no-unstable-default-props": "error",
588
+ "@eslint-react/no-unused-class-component-members": "error",
589
+ "@eslint-react/no-unused-state": "error",
590
+ "@eslint-react/no-use-context": "error",
591
+ "@eslint-react/purity": "error",
592
+ "@eslint-react/refs": "error",
593
+ "@eslint-react/rsc-function-definition": "error",
594
+ "@eslint-react/rules-of-hooks": "error",
595
+ "@eslint-react/set-state-in-effect": "error",
596
+ "@eslint-react/set-state-in-render": "error",
597
+ "@eslint-react/static-components": "off",
598
+ "@eslint-react/unsupported-syntax": "error",
599
+ "@eslint-react/use-memo": "error",
600
+ "@eslint-react/use-state": "error",
601
+ "@eslint-react/web-api-no-leaked-event-listener": "error",
602
+ "@eslint-react/web-api-no-leaked-fetch": "error",
603
+ "@eslint-react/web-api-no-leaked-intersection-observer": "error",
604
+ "@eslint-react/web-api-no-leaked-interval": "error",
605
+ "@eslint-react/web-api-no-leaked-resize-observer": "error",
606
+ "@eslint-react/web-api-no-leaked-timeout": "error",
607
+ "react-hooks-js/config": "error",
608
+ "react-hooks-js/error-boundaries": "off",
609
+ "react-hooks-js/exhaustive-deps": "off",
610
+ "react-hooks-js/gating": "error",
611
+ "react-hooks-js/globals": "off",
612
+ "react-hooks-js/immutability": "off",
613
+ "react-hooks-js/incompatible-library": "error",
614
+ "react-hooks-js/preserve-manual-memoization": "error",
615
+ "react-hooks-js/purity": "off",
616
+ "react-hooks-js/refs": "off",
617
+ "react-hooks-js/rules-of-hooks": "off",
618
+ "react-hooks-js/set-state-in-effect": "off",
619
+ "react-hooks-js/set-state-in-render": "off",
620
+ "react-hooks-js/static-components": "off",
621
+ "react-hooks-js/unsupported-syntax": "off",
622
+ "react-hooks-js/use-memo": "off",
623
+ "react-hooks-js/void-use-memo": "error"
1228
624
  }
1229
625
  }];
1230
626
  //#endregion
1231
627
  //#region src/configs/regexp.ts
1232
628
  const regexp = () => [{
1233
629
  files: [GLOB_SRC],
1234
- jsPlugins: ["eslint-plugin-regexp"],
1235
- rules: { ...regexpRecommendedRules }
630
+ jsPlugins: [{
631
+ name: "regexp",
632
+ specifier: "eslint-plugin-regexp"
633
+ }],
634
+ rules: {
635
+ "eslint/no-control-regex": "error",
636
+ "eslint/no-empty-character-class": "off",
637
+ "eslint/no-invalid-regexp": "off",
638
+ "eslint/no-misleading-character-class": "error",
639
+ "eslint/no-regex-spaces": "error",
640
+ "eslint/no-useless-backreference": "off",
641
+ "eslint/prefer-regex-literals": "error",
642
+ "regexp/confusing-quantifier": "error",
643
+ "regexp/control-character-escape": "error",
644
+ "regexp/match-any": "error",
645
+ "regexp/negation": "error",
646
+ "regexp/no-contradiction-with-assertion": "error",
647
+ "regexp/no-dupe-characters-character-class": "error",
648
+ "regexp/no-dupe-disjunctions": "error",
649
+ "regexp/no-empty-alternative": "error",
650
+ "regexp/no-empty-capturing-group": "error",
651
+ "regexp/no-empty-character-class": "error",
652
+ "regexp/no-empty-group": "error",
653
+ "regexp/no-empty-lookarounds-assertion": "error",
654
+ "regexp/no-empty-string-literal": "error",
655
+ "regexp/no-escape-backspace": "error",
656
+ "regexp/no-extra-lookaround-assertions": "error",
657
+ "regexp/no-invalid-regexp": "error",
658
+ "regexp/no-invisible-character": "error",
659
+ "regexp/no-lazy-ends": "error",
660
+ "regexp/no-legacy-features": "error",
661
+ "regexp/no-misleading-capturing-group": "error",
662
+ "regexp/no-misleading-unicode-character": "error",
663
+ "regexp/no-missing-g-flag": "error",
664
+ "regexp/no-non-standard-flag": "error",
665
+ "regexp/no-obscure-range": "error",
666
+ "regexp/no-optional-assertion": "error",
667
+ "regexp/no-potentially-useless-backreference": "error",
668
+ "regexp/no-super-linear-backtracking": "error",
669
+ "regexp/no-trivially-nested-assertion": "error",
670
+ "regexp/no-trivially-nested-quantifier": "error",
671
+ "regexp/no-unused-capturing-group": "error",
672
+ "regexp/no-useless-assertions": "error",
673
+ "regexp/no-useless-backreference": "error",
674
+ "regexp/no-useless-character-class": "error",
675
+ "regexp/no-useless-dollar-replacements": "error",
676
+ "regexp/no-useless-escape": "error",
677
+ "regexp/no-useless-flag": "error",
678
+ "regexp/no-useless-lazy": "error",
679
+ "regexp/no-useless-non-capturing-group": "error",
680
+ "regexp/no-useless-quantifier": "error",
681
+ "regexp/no-useless-range": "error",
682
+ "regexp/no-useless-set-operand": "error",
683
+ "regexp/no-useless-string-literal": "error",
684
+ "regexp/no-useless-two-nums-quantifier": "error",
685
+ "regexp/no-zero-quantifier": "error",
686
+ "regexp/optimal-lookaround-quantifier": "error",
687
+ "regexp/optimal-quantifier-concatenation": "error",
688
+ "regexp/prefer-character-class": "error",
689
+ "regexp/prefer-d": "error",
690
+ "regexp/prefer-plus-quantifier": "error",
691
+ "regexp/prefer-predefined-assertion": "error",
692
+ "regexp/prefer-question-quantifier": "error",
693
+ "regexp/prefer-range": "error",
694
+ "regexp/prefer-set-operation": "error",
695
+ "regexp/prefer-star-quantifier": "error",
696
+ "regexp/prefer-unicode-codepoint-escapes": "error",
697
+ "regexp/prefer-w": "error",
698
+ "regexp/simplify-set-operations": "error",
699
+ "regexp/sort-flags": "error",
700
+ "regexp/strict": "error",
701
+ "regexp/use-ignore-case": "error"
702
+ }
1236
703
  }];
1237
704
  //#endregion
1238
705
  //#region src/configs/sonarjs.ts
1239
706
  const sonarjs = () => [{
1240
707
  files: [GLOB_SRC],
1241
- jsPlugins: ["eslint-plugin-sonarjs"],
708
+ jsPlugins: [{
709
+ name: "sonarjs",
710
+ specifier: "eslint-plugin-sonarjs"
711
+ }],
1242
712
  rules: {
1243
- ...sonarjsRecommendedRules,
1244
- "sonarjs/no-commented-code": "off",
1245
- "sonarjs/deprecation": "off",
713
+ "sonarjs/anchor-precedence": "error",
714
+ "sonarjs/argument-type": "off",
1246
715
  "sonarjs/arguments-order": "off",
1247
- "sonarjs/pseudo-random": "off",
716
+ "sonarjs/arguments-usage": "off",
717
+ "sonarjs/array-callback-without-return": "error",
718
+ "sonarjs/array-constructor": "off",
719
+ "sonarjs/arrow-function-convention": "off",
720
+ "sonarjs/assertions-in-tests": "off",
721
+ "sonarjs/async-test-assertions": "error",
722
+ "sonarjs/aws-apigateway-public-api": "error",
723
+ "sonarjs/aws-ec2-rds-dms-public": "error",
724
+ "sonarjs/aws-ec2-unencrypted-ebs-volume": "error",
725
+ "sonarjs/aws-efs-unencrypted": "error",
726
+ "sonarjs/aws-iam-all-privileges": "error",
727
+ "sonarjs/aws-iam-all-resources-accessible": "off",
728
+ "sonarjs/aws-iam-privilege-escalation": "error",
729
+ "sonarjs/aws-iam-public-access": "error",
730
+ "sonarjs/aws-opensearchservice-domain": "error",
731
+ "sonarjs/aws-rds-unencrypted-databases": "error",
732
+ "sonarjs/aws-restricted-ip-admin-access": "error",
733
+ "sonarjs/aws-s3-bucket-granted-access": "error",
734
+ "sonarjs/aws-s3-bucket-insecure-http": "error",
735
+ "sonarjs/aws-s3-bucket-public-access": "error",
736
+ "sonarjs/aws-s3-bucket-versioning": "error",
737
+ "sonarjs/aws-sagemaker-unencrypted-notebook": "error",
738
+ "sonarjs/aws-sns-unencrypted-topics": "error",
739
+ "sonarjs/aws-sqs-unencrypted-queue": "error",
740
+ "sonarjs/bitwise-operators": "error",
741
+ "sonarjs/block-scoped-var": "error",
742
+ "sonarjs/bool-param-default": "off",
743
+ "sonarjs/call-argument-line": "error",
744
+ "sonarjs/chai-determinate-assertion": "error",
745
+ "sonarjs/class-name": "error",
746
+ "sonarjs/class-prototype": "off",
747
+ "sonarjs/code-eval": "error",
748
+ "sonarjs/cognitive-complexity": "off",
749
+ "sonarjs/comma-or-logical-or-case": "error",
750
+ "sonarjs/comment-regex": "off",
751
+ "sonarjs/concise-regex": "error",
752
+ "sonarjs/conditional-indentation": "off",
753
+ "sonarjs/confidential-information-logging": "off",
754
+ "sonarjs/constructor-for-side-effects": "error",
755
+ "sonarjs/content-length": "error",
756
+ "sonarjs/content-security-policy": "error",
757
+ "sonarjs/cookie-no-httponly": "error",
758
+ "sonarjs/cors": "error",
759
+ "sonarjs/csrf": "error",
760
+ "sonarjs/cyclomatic-complexity": "off",
761
+ "sonarjs/declarations-in-global-scope": "off",
762
+ "sonarjs/deprecation": "off",
763
+ "sonarjs/destructuring-assignment-syntax": "off",
764
+ "sonarjs/different-types-comparison": "error",
765
+ "sonarjs/disabled-auto-escaping": "error",
766
+ "sonarjs/disabled-resource-integrity": "error",
767
+ "sonarjs/disabled-timeout": "error",
768
+ "sonarjs/dompurify-unsafe-config": "error",
769
+ "sonarjs/duplicates-in-character-class": "error",
770
+ "sonarjs/dynamically-constructed-templates": "error",
771
+ "sonarjs/elseif-without-else": "off",
772
+ "sonarjs/empty-string-repetition": "error",
773
+ "sonarjs/encryption-secure-mode": "error",
774
+ "sonarjs/existing-groups": "error",
775
+ "sonarjs/expression-complexity": "off",
776
+ "sonarjs/file-header": "off",
777
+ "sonarjs/file-name-differ-from-class": "off",
778
+ "sonarjs/file-permissions": "error",
779
+ "sonarjs/file-uploads": "error",
780
+ "sonarjs/fixme-tag": "error",
781
+ "sonarjs/for-in": "off",
782
+ "sonarjs/for-loop-increment-sign": "error",
783
+ "sonarjs/frame-ancestors": "off",
784
+ "sonarjs/function-inside-loop": "error",
785
+ "sonarjs/function-name": "off",
1248
786
  "sonarjs/function-return-type": "off",
787
+ "sonarjs/future-reserved-words": "error",
788
+ "sonarjs/generator-without-yield": "error",
789
+ "sonarjs/hardcoded-secret-signatures": "error",
790
+ "sonarjs/hashing": "error",
791
+ "sonarjs/hidden-files": "off",
792
+ "sonarjs/hooks-before-test-cases": "error",
793
+ "sonarjs/in-operator-type-error": "error",
794
+ "sonarjs/inconsistent-function-call": "error",
795
+ "sonarjs/index-of-compare-to-positive-number": "error",
796
+ "sonarjs/insecure-cookie": "error",
797
+ "sonarjs/insecure-jwt-token": "error",
798
+ "sonarjs/inverted-assertion-arguments": "error",
799
+ "sonarjs/jsx-no-leaked-render": "off",
800
+ "sonarjs/label-position": "error",
801
+ "sonarjs/link-with-target-blank": "error",
802
+ "sonarjs/max-lines": "off",
803
+ "sonarjs/max-lines-per-function": "off",
804
+ "sonarjs/max-switch-cases": "error",
805
+ "sonarjs/max-union-size": "off",
806
+ "sonarjs/misplaced-loop-counter": "error",
807
+ "sonarjs/nested-control-flow": "off",
808
+ "sonarjs/new-operator-misuse": "error",
809
+ "sonarjs/no-all-duplicated-branches": "error",
810
+ "sonarjs/no-alphabetical-sort": "error",
811
+ "sonarjs/no-angular-bypass-sanitization": "error",
812
+ "sonarjs/no-array-delete": "error",
813
+ "sonarjs/no-associative-arrays": "error",
814
+ "sonarjs/no-async-constructor": "error",
815
+ "sonarjs/no-built-in-override": "off",
816
+ "sonarjs/no-case-label-in-switch": "error",
817
+ "sonarjs/no-clear-text-protocols": "error",
818
+ "sonarjs/no-code-after-done": "error",
819
+ "sonarjs/no-collapsible-if": "off",
820
+ "sonarjs/no-collection-size-mischeck": "error",
821
+ "sonarjs/no-commented-code": "off",
822
+ "sonarjs/no-control-regex": "error",
823
+ "sonarjs/no-dead-store": "error",
824
+ "sonarjs/no-delete-var": "error",
825
+ "sonarjs/no-duplicate-in-composite": "error",
826
+ "sonarjs/no-duplicate-string": "off",
827
+ "sonarjs/no-duplicate-test-title": "error",
828
+ "sonarjs/no-duplicated-branches": "error",
829
+ "sonarjs/no-element-overwrite": "error",
830
+ "sonarjs/no-empty-after-reluctant": "error",
831
+ "sonarjs/no-empty-alternatives": "error",
832
+ "sonarjs/no-empty-character-class": "error",
833
+ "sonarjs/no-empty-collection": "error",
834
+ "sonarjs/no-empty-group": "error",
835
+ "sonarjs/no-empty-test-file": "error",
836
+ "sonarjs/no-empty-test-title": "error",
837
+ "sonarjs/no-equals-in-for-termination": "error",
838
+ "sonarjs/no-exclusive-tests": "error",
839
+ "sonarjs/no-extra-arguments": "error",
840
+ "sonarjs/no-fallthrough": "error",
841
+ "sonarjs/no-floating-point-equality": "error",
842
+ "sonarjs/no-for-in-iterable": "off",
843
+ "sonarjs/no-forced-browser-interaction": "error",
844
+ "sonarjs/no-function-declaration-in-block": "off",
845
+ "sonarjs/no-global-this": "error",
846
+ "sonarjs/no-globals-shadowing": "error",
847
+ "sonarjs/no-gratuitous-expressions": "error",
848
+ "sonarjs/no-hardcoded-ip": "error",
849
+ "sonarjs/no-hardcoded-passwords": "error",
850
+ "sonarjs/no-hardcoded-secrets": "error",
851
+ "sonarjs/no-hook-setter-in-body": "error",
852
+ "sonarjs/no-identical-conditions": "error",
853
+ "sonarjs/no-identical-expressions": "error",
854
+ "sonarjs/no-identical-functions": "error",
855
+ "sonarjs/no-ignored-exceptions": "error",
856
+ "sonarjs/no-ignored-return": "error",
857
+ "sonarjs/no-implicit-dependencies": "off",
858
+ "sonarjs/no-implicit-global": "error",
859
+ "sonarjs/no-in-misuse": "error",
860
+ "sonarjs/no-incompatible-assertion-types": "error",
861
+ "sonarjs/no-incomplete-assertions": "error",
862
+ "sonarjs/no-inconsistent-returns": "off",
863
+ "sonarjs/no-incorrect-string-concat": "off",
864
+ "sonarjs/no-internal-api-use": "error",
865
+ "sonarjs/no-intrusive-permissions": "off",
866
+ "sonarjs/no-invalid-regexp": "error",
867
+ "sonarjs/no-invariant-returns": "error",
868
+ "sonarjs/no-inverted-boolean-check": "error",
869
+ "sonarjs/no-ip-forward": "off",
870
+ "sonarjs/no-labels": "error",
871
+ "sonarjs/no-literal-call": "error",
872
+ "sonarjs/no-mime-sniff": "error",
873
+ "sonarjs/no-misleading-array-reverse": "error",
874
+ "sonarjs/no-misleading-character-class": "error",
875
+ "sonarjs/no-mixed-content": "off",
876
+ "sonarjs/no-nested-assignment": "error",
877
+ "sonarjs/no-nested-conditional": "error",
878
+ "sonarjs/no-nested-functions": "error",
879
+ "sonarjs/no-nested-incdec": "off",
880
+ "sonarjs/no-nested-switch": "off",
881
+ "sonarjs/no-nested-template-literals": "error",
882
+ "sonarjs/no-os-command-from-path": "error",
883
+ "sonarjs/no-parameter-reassignment": "error",
884
+ "sonarjs/no-primitive-wrappers": "error",
885
+ "sonarjs/no-redundant-assignments": "error",
886
+ "sonarjs/no-redundant-boolean": "error",
887
+ "sonarjs/no-redundant-jump": "error",
888
+ "sonarjs/no-redundant-optional": "error",
889
+ "sonarjs/no-redundant-parentheses": "off",
890
+ "sonarjs/no-reference-error": "off",
891
+ "sonarjs/no-referrer-policy": "error",
892
+ "sonarjs/no-regex-spaces": "error",
893
+ "sonarjs/no-require-or-define": "off",
894
+ "sonarjs/no-return-type-any": "off",
895
+ "sonarjs/no-same-argument-assert": "error",
896
+ "sonarjs/no-same-line-conditional": "error",
897
+ "sonarjs/no-selector-parameter": "error",
898
+ "sonarjs/no-session-cookies-on-static-assets": "error",
899
+ "sonarjs/no-skipped-tests": "error",
900
+ "sonarjs/no-small-switch": "error",
901
+ "sonarjs/no-sonar-comments": "off",
902
+ "sonarjs/no-tab": "off",
903
+ "sonarjs/no-table-as-layout": "error",
904
+ "sonarjs/no-trivial-assertions": "error",
905
+ "sonarjs/no-try-promise": "error",
906
+ "sonarjs/no-undefined-argument": "error",
907
+ "sonarjs/no-undefined-assignment": "off",
908
+ "sonarjs/no-unenclosed-multiline-block": "error",
909
+ "sonarjs/no-uniq-key": "error",
910
+ "sonarjs/no-unsafe-unzip": "off",
911
+ "sonarjs/no-unthrown-error": "error",
912
+ "sonarjs/no-unused-collection": "error",
913
+ "sonarjs/no-unused-function-argument": "off",
914
+ "sonarjs/no-unused-vars": "error",
915
+ "sonarjs/no-use-of-empty-return-value": "error",
916
+ "sonarjs/no-useless-catch": "error",
917
+ "sonarjs/no-useless-increment": "error",
918
+ "sonarjs/no-useless-intersection": "error",
919
+ "sonarjs/no-useless-react-setstate": "error",
920
+ "sonarjs/no-variable-usage-before-declaration": "off",
921
+ "sonarjs/no-weak-cipher": "error",
922
+ "sonarjs/no-weak-keys": "error",
923
+ "sonarjs/no-wildcard-import": "off",
924
+ "sonarjs/non-existent-operator": "error",
925
+ "sonarjs/non-number-in-arithmetic-expression": "off",
926
+ "sonarjs/null-dereference": "error",
927
+ "sonarjs/object-alt-content": "error",
928
+ "sonarjs/operation-returning-nan": "off",
929
+ "sonarjs/os-command": "off",
930
+ "sonarjs/post-message": "error",
931
+ "sonarjs/prefer-default-last": "error",
932
+ "sonarjs/prefer-immediate-return": "off",
933
+ "sonarjs/prefer-object-literal": "off",
934
+ "sonarjs/prefer-promise-shorthand": "error",
1249
935
  "sonarjs/prefer-read-only-props": "off",
1250
- "sonarjs/argument-type": "off",
1251
- "sonarjs/cognitive-complexity": "off",
1252
- "sonarjs/jsx-no-leaked-render": "off"
936
+ "sonarjs/prefer-regexp-exec": "error",
937
+ "sonarjs/prefer-single-boolean-return": "error",
938
+ "sonarjs/prefer-specific-assertions": "error",
939
+ "sonarjs/prefer-type-guard": "error",
940
+ "sonarjs/prefer-while": "error",
941
+ "sonarjs/production-debug": "error",
942
+ "sonarjs/pseudo-random": "off",
943
+ "sonarjs/public-static-readonly": "error",
944
+ "sonarjs/publicly-writable-directories": "error",
945
+ "sonarjs/reduce-initial-value": "error",
946
+ "sonarjs/redundant-type-aliases": "error",
947
+ "sonarjs/regex-complexity": "error",
948
+ "sonarjs/review-blockchain-mnemonic": "error",
949
+ "sonarjs/session-regeneration": "error",
950
+ "sonarjs/shorthand-property-grouping": "off",
951
+ "sonarjs/single-char-in-character-classes": "error",
952
+ "sonarjs/single-character-alternation": "error",
953
+ "sonarjs/slow-regex": "error",
954
+ "sonarjs/sql-queries": "error",
955
+ "sonarjs/stable-tests": "error",
956
+ "sonarjs/stateful-regex": "error",
957
+ "sonarjs/strict-transport-security": "error",
958
+ "sonarjs/strings-comparison": "off",
959
+ "sonarjs/super-linear-regex": "error",
960
+ "sonarjs/table-header": "error",
961
+ "sonarjs/table-header-reference": "error",
962
+ "sonarjs/test-check-exception": "error",
963
+ "sonarjs/todo-tag": "error",
964
+ "sonarjs/too-many-break-or-continue-in-loop": "off",
965
+ "sonarjs/unicode-aware-regex": "off",
966
+ "sonarjs/unused-import": "error",
967
+ "sonarjs/unused-named-groups": "error",
968
+ "sonarjs/unverified-certificate": "error",
969
+ "sonarjs/unverified-hostname": "error",
970
+ "sonarjs/updated-const-var": "error",
971
+ "sonarjs/updated-loop-counter": "error",
972
+ "sonarjs/use-type-alias": "error",
973
+ "sonarjs/useless-string-operation": "off",
974
+ "sonarjs/values-not-convertible-to-numbers": "off",
975
+ "sonarjs/variable-name": "off",
976
+ "sonarjs/void-use": "error",
977
+ "sonarjs/weak-ssl": "error",
978
+ "sonarjs/web-sql-database": "off",
979
+ "sonarjs/x-powered-by": "error",
980
+ "sonarjs/xml-parser-xxe": "error"
1253
981
  }
1254
982
  }];
1255
983
  //#endregion
1256
984
  //#region src/configs/stylistic.ts
1257
985
  const stylistic = () => [{
1258
986
  files: [GLOB_SRC],
1259
- jsPlugins: ["@stylistic/eslint-plugin"],
987
+ jsPlugins: [{
988
+ name: "@stylistic",
989
+ specifier: "@stylistic/eslint-plugin"
990
+ }],
1260
991
  rules: { "@stylistic/multiline-comment-style": ["error", "separate-lines"] }
1261
992
  }];
1262
993
  //#endregion
1263
994
  //#region src/configs/tailwindcss.ts
1264
- const tailwindcss = (options) => {
1265
- const disableShorthand = options.canonical?.logical ?? true;
1266
- return [{
1267
- files: [GLOB_SRC],
1268
- jsPlugins: ["eslint-plugin-better-tailwindcss"],
1269
- rules: {
1270
- "better-tailwindcss/enforce-canonical-classes": ["error", {
1271
- collapse: options.canonical?.collapse ?? true,
1272
- logical: options.canonical?.logical ?? true
1273
- }],
1274
- "better-tailwindcss/enforce-consistent-important-position": "off",
1275
- "better-tailwindcss/enforce-consistent-variable-syntax": "off",
1276
- "better-tailwindcss/enforce-shorthand-classes": disableShorthand ? "off" : "error",
1277
- "better-tailwindcss/enforce-consistent-class-order": ["error", {
1278
- order: options.classOrder?.order ?? "official",
1279
- componentClassOrder: options.classOrder?.componentOrder ?? "preserve",
1280
- componentClassPosition: options.classOrder?.componentPosition ?? "start",
1281
- unknownClassOrder: options.classOrder?.unknownOrder ?? "preserve",
1282
- unknownClassPosition: options.classOrder?.unknownPosition ?? "start"
1283
- }],
1284
- "better-tailwindcss/no-conflicting-classes": "error",
1285
- "better-tailwindcss/no-deprecated-classes": "error",
1286
- "better-tailwindcss/no-duplicate-classes": "error",
1287
- "better-tailwindcss/no-restricted-classes": ["error", { restrict: options.restrict ?? [] }],
1288
- "better-tailwindcss/no-unknown-classes": ["error", { ignore: options.ignore ?? [] }],
1289
- "better-tailwindcss/no-unnecessary-whitespace": ["error", { allowMultiline: options.whitespace?.allowMultiline ?? true }]
1290
- }
1291
- }];
1292
- };
995
+ const tailwindcss = (options) => [{
996
+ files: [GLOB_SRC],
997
+ jsPlugins: [{
998
+ name: "better-tailwindcss",
999
+ specifier: "eslint-plugin-better-tailwindcss"
1000
+ }],
1001
+ rules: {
1002
+ "better-tailwindcss/enforce-canonical-classes": ["error", {
1003
+ collapse: options.canonical?.collapse ?? true,
1004
+ logical: options.canonical?.logical ?? true
1005
+ }],
1006
+ "better-tailwindcss/enforce-consistent-class-order": ["error", {
1007
+ order: options.classOrder?.order ?? "official",
1008
+ componentClassOrder: options.classOrder?.componentOrder ?? "preserve",
1009
+ componentClassPosition: options.classOrder?.componentPosition ?? "start",
1010
+ unknownClassOrder: options.classOrder?.unknownOrder ?? "preserve",
1011
+ unknownClassPosition: options.classOrder?.unknownPosition ?? "start"
1012
+ }],
1013
+ "better-tailwindcss/enforce-consistent-important-position": "off",
1014
+ "better-tailwindcss/enforce-consistent-variable-syntax": "off",
1015
+ "better-tailwindcss/enforce-consistent-variant-order": "error",
1016
+ "better-tailwindcss/enforce-shorthand-classes": options.canonical?.logical ?? true ? "off" : "error",
1017
+ "better-tailwindcss/no-conflicting-classes": "error",
1018
+ "better-tailwindcss/no-deprecated-classes": "error",
1019
+ "better-tailwindcss/no-duplicate-classes": "error",
1020
+ "better-tailwindcss/no-restricted-classes": ["error", { restrict: options.restrict ?? [] }],
1021
+ "better-tailwindcss/no-unknown-classes": ["error", { ignore: options.ignore ?? [] }],
1022
+ "better-tailwindcss/no-unnecessary-whitespace": ["error", { allowMultiline: options.whitespace?.allowMultiline ?? true }]
1023
+ }
1024
+ }];
1293
1025
  //#endregion
1294
1026
  //#region src/configs/typescript.ts
1295
1027
  const typescript = () => [{
1296
1028
  files: [GLOB_SRC],
1297
- plugins: ["typescript"],
1029
+ plugins: ["typescript", "eslint"],
1298
1030
  rules: {
1031
+ "eslint/constructor-super": "off",
1032
+ "eslint/getter-return": "off",
1033
+ "eslint/no-class-assign": "off",
1034
+ "eslint/no-const-assign": "off",
1035
+ "eslint/no-dupe-keys": "off",
1036
+ "eslint/no-func-assign": "off",
1037
+ "eslint/no-implied-eval": "off",
1038
+ "eslint/no-import-assign": "off",
1039
+ "eslint/no-new-native-nonconstructor": "off",
1040
+ "eslint/no-obj-calls": "off",
1041
+ "eslint/no-setter-return": "off",
1042
+ "eslint/no-this-before-super": "off",
1043
+ "eslint/no-throw-literal": "off",
1044
+ "eslint/no-undef": "off",
1045
+ "eslint/no-unreachable": "off",
1046
+ "eslint/no-unsafe-negation": "off",
1047
+ "eslint/no-var": "error",
1048
+ "eslint/no-with": "off",
1049
+ "eslint/prefer-const": "error",
1050
+ "eslint/prefer-promise-reject-errors": "off",
1051
+ "eslint/prefer-rest-params": "error",
1052
+ "eslint/prefer-spread": "error",
1053
+ "eslint/require-await": "off",
1299
1054
  "typescript/adjacent-overload-signatures": "error",
1300
1055
  "typescript/array-type": ["error", {
1301
1056
  default: "array-simple",
@@ -1419,8 +1174,11 @@ const typescript = () => [{
1419
1174
  //#region src/configs/unicorn.ts
1420
1175
  const unicorn = () => [{
1421
1176
  files: [GLOB_SRC],
1422
- plugins: ["unicorn"],
1177
+ plugins: ["unicorn", "eslint"],
1423
1178
  rules: {
1179
+ "eslint/logical-assignment-operators": "off",
1180
+ "eslint/no-negated-condition": "off",
1181
+ "eslint/no-nested-ternary": "off",
1424
1182
  "unicorn/catch-error-name": "error",
1425
1183
  "unicorn/consistent-assert": "error",
1426
1184
  "unicorn/consistent-date-clone": "error",
@@ -1428,18 +1186,20 @@ const unicorn = () => [{
1428
1186
  "unicorn/consistent-existence-index-check": "error",
1429
1187
  "unicorn/consistent-function-scoping": "error",
1430
1188
  "unicorn/consistent-template-literal-escape": "error",
1189
+ "unicorn/custom-error-definition": "off",
1431
1190
  "unicorn/empty-brace-spaces": "error",
1432
1191
  "unicorn/error-message": "error",
1433
1192
  "unicorn/escape-case": "error",
1434
1193
  "unicorn/explicit-length-check": "error",
1435
1194
  "unicorn/filename-case": "error",
1436
1195
  "unicorn/import-style": "error",
1196
+ "unicorn/max-nested-calls": "off",
1437
1197
  "unicorn/new-for-builtins": "error",
1438
1198
  "unicorn/no-abusive-eslint-disable": "error",
1439
1199
  "unicorn/no-accessor-recursion": "error",
1440
1200
  "unicorn/no-anonymous-default-export": "error",
1441
1201
  "unicorn/no-array-callback-reference": "error",
1442
- "unicorn/no-array-for-each": "error",
1202
+ "unicorn/no-array-fill-with-reference-type": "error",
1443
1203
  "unicorn/no-array-method-this-argument": "error",
1444
1204
  "unicorn/no-array-reduce": "error",
1445
1205
  "unicorn/no-array-reverse": "error",
@@ -1447,8 +1207,8 @@ const unicorn = () => [{
1447
1207
  "unicorn/no-await-expression-member": "error",
1448
1208
  "unicorn/no-await-in-promise-methods": "error",
1449
1209
  "unicorn/no-console-spaces": "error",
1210
+ "unicorn/no-document-cookie": "off",
1450
1211
  "unicorn/no-empty-file": "error",
1451
- "unicorn/no-hex-escape": "error",
1452
1212
  "unicorn/no-immediate-mutation": "error",
1453
1213
  "unicorn/no-instanceof-builtins": "error",
1454
1214
  "unicorn/no-invalid-fetch-options": "error",
@@ -1460,6 +1220,7 @@ const unicorn = () => [{
1460
1220
  "unicorn/no-nested-ternary": "error",
1461
1221
  "unicorn/no-new-array": "error",
1462
1222
  "unicorn/no-new-buffer": "error",
1223
+ "unicorn/no-null": "off",
1463
1224
  "unicorn/no-object-as-default-parameter": "error",
1464
1225
  "unicorn/no-process-exit": "error",
1465
1226
  "unicorn/no-single-promise-in-promise-methods": "error",
@@ -1500,12 +1261,12 @@ const unicorn = () => [{
1500
1261
  "unicorn/prefer-date-now": "error",
1501
1262
  "unicorn/prefer-default-parameters": "error",
1502
1263
  "unicorn/prefer-dom-node-append": "error",
1503
- "unicorn/prefer-dom-node-dataset": "error",
1504
1264
  "unicorn/prefer-dom-node-remove": "error",
1505
1265
  "unicorn/prefer-dom-node-text-content": "error",
1506
1266
  "unicorn/prefer-event-target": "error",
1507
1267
  "unicorn/prefer-export-from": "error",
1508
1268
  "unicorn/prefer-global-this": "error",
1269
+ "unicorn/prefer-import-meta-properties": "off",
1509
1270
  "unicorn/prefer-includes": "error",
1510
1271
  "unicorn/prefer-keyboard-event-key": "error",
1511
1272
  "unicorn/prefer-logical-operator-over-ternary": "error",
@@ -1517,6 +1278,7 @@ const unicorn = () => [{
1517
1278
  "unicorn/prefer-native-coercion-functions": "error",
1518
1279
  "unicorn/prefer-negative-index": "error",
1519
1280
  "unicorn/prefer-node-protocol": "error",
1281
+ "unicorn/prefer-number-coercion": "off",
1520
1282
  "unicorn/prefer-number-properties": "error",
1521
1283
  "unicorn/prefer-object-from-entries": "error",
1522
1284
  "unicorn/prefer-optional-catch-binding": "error",
@@ -1529,6 +1291,7 @@ const unicorn = () => [{
1529
1291
  "unicorn/prefer-set-size": "error",
1530
1292
  "unicorn/prefer-single-call": "error",
1531
1293
  "unicorn/prefer-spread": "error",
1294
+ "unicorn/prefer-string-raw": "off",
1532
1295
  "unicorn/prefer-string-replace-all": "error",
1533
1296
  "unicorn/prefer-string-slice": "error",
1534
1297
  "unicorn/prefer-string-starts-ends-with": "error",
@@ -1542,6 +1305,7 @@ const unicorn = () => [{
1542
1305
  "unicorn/require-module-attributes": "error",
1543
1306
  "unicorn/require-module-specifiers": "error",
1544
1307
  "unicorn/require-number-to-fixed-digits-argument": "error",
1308
+ "unicorn/require-post-message-target-origin": "off",
1545
1309
  "unicorn/switch-case-braces": "error",
1546
1310
  "unicorn/switch-case-break-position": "error",
1547
1311
  "unicorn/text-encoding-identifier-case": ["error", { withDash: true }],
@@ -1556,10 +1320,8 @@ const vitest = (config) => [{
1556
1320
  rules: {
1557
1321
  "vitest/consistent-test-it": ["error", { fn: "test" }],
1558
1322
  "vitest/expect-expect": "error",
1559
- "vitest/hoisted-apis-on-top": "off",
1560
1323
  "vitest/no-commented-out-tests": "error",
1561
1324
  "vitest/no-conditional-expect": "error",
1562
- "vitest/no-conditional-tests": "off",
1563
1325
  "vitest/no-disabled-tests": "error",
1564
1326
  "vitest/no-focused-tests": "error",
1565
1327
  "vitest/no-identical-title": "error",
@@ -1570,11 +1332,7 @@ const vitest = (config) => [{
1570
1332
  "vitest/no-unneeded-async-expect-function": "error",
1571
1333
  "vitest/prefer-called-exactly-once-with": "error",
1572
1334
  "vitest/prefer-mock-return-shorthand": "error",
1573
- "vitest/prefer-snapshot-hint": "off",
1574
- "vitest/require-awaited-expect-poll": "off",
1575
1335
  "vitest/require-local-test-context-for-concurrent-snapshots": "error",
1576
- "vitest/require-mock-type-parameters": "off",
1577
- "vitest/require-to-throw-message": "off",
1578
1336
  "vitest/valid-describe-callback": "error",
1579
1337
  "vitest/valid-expect": "error",
1580
1338
  "vitest/valid-expect-in-promise": "error",
@@ -1586,16 +1344,14 @@ const vitest = (config) => [{
1586
1344
  //#region src/configs/zod.ts
1587
1345
  const zod = () => [{
1588
1346
  files: [GLOB_SRC],
1589
- jsPlugins: ["eslint-plugin-import-zod"],
1347
+ jsPlugins: [{
1348
+ name: "import-zod",
1349
+ specifier: "eslint-plugin-import-zod"
1350
+ }],
1590
1351
  rules: { "import-zod/prefer-zod-namespace": "error" }
1591
1352
  }];
1592
1353
  //#endregion
1593
1354
  //#region src/base.ts
1594
- const createSelectors = (names, kind) => names.map((name) => ({
1595
- name,
1596
- kind,
1597
- match: [{ type: "strings" }, { type: "objectValues" }]
1598
- }));
1599
1355
  const concatArrays = (target, source) => {
1600
1356
  if (Array.isArray(target) && Array.isArray(source)) return [...target, ...source];
1601
1357
  };
@@ -1648,12 +1404,7 @@ const defineConfig = ({ config = {}, custom: userConfig = {} } = {}) => {
1648
1404
  } },
1649
1405
  ...userConfig.tailwindcss && { "better-tailwindcss": {
1650
1406
  detectComponentClasses: false,
1651
- rootFontSize: 16,
1652
- selectors: [
1653
- ...betterTailwindcssDefaultSelectors,
1654
- ...createSelectors(["classNames", ".+ClassNames"], "attribute"),
1655
- ...createSelectors([".+ClassName", ".+ClassNames"], "variable")
1656
- ]
1407
+ rootFontSize: 16
1657
1408
  } }
1658
1409
  }
1659
1410
  }, {
@@ -1664,6 +1415,7 @@ const defineConfig = ({ config = {}, custom: userConfig = {} } = {}) => {
1664
1415
  "entryPoint",
1665
1416
  "tailwindConfig",
1666
1417
  "tsconfig",
1418
+ "cwd",
1667
1419
  "detectComponentClasses",
1668
1420
  "rootFontSize",
1669
1421
  "messageStyle",