@comment-labs/oxlint-config 1.0.0-beta.9 → 1.0.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/README.md CHANGED
@@ -16,6 +16,7 @@ Create an `oxlint.config.ts` file in your project root:
16
16
  import { defineConfig } from 'oxlint'
17
17
  import { config } from '@comment-labs/oxlint-config'
18
18
 
19
+
19
20
  export default defineConfig(config)
20
21
  ```
21
22
 
@@ -26,6 +27,16 @@ export default defineConfig(config)
26
27
  - Vitest compatibility
27
28
  - Optimized for correctness and performance
28
29
 
30
+ Add a lint script to `package.json`:
31
+
32
+ ```json
33
+ {
34
+ "scripts": {
35
+ "lint": "oxlint"
36
+ }
37
+ }
38
+ ```
39
+
29
40
  ## License
30
41
 
31
42
  [Apache-2.0](https://github.com/comment-team/comment-labs/blob/main/LICENSE)
package/dist/index.d.mts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { OxlintConfig } from "oxlint";
2
-
3
2
  //#region src/index.d.ts
4
3
  declare const config: OxlintConfig;
5
4
  //#endregion
package/dist/index.mjs CHANGED
@@ -1,4 +1,3 @@
1
- import "oxlint";
2
1
  import globalsPkg from "globals";
3
2
  import { access, readFile } from "node:fs/promises";
4
3
  import { join } from "node:path";
@@ -76,6 +75,7 @@ const baseRules = {
76
75
  "no-unassigned-import": "off",
77
76
  "no-use-before-define": ["warn", { functions: false }],
78
77
  "no-warning-comments": "off",
78
+ "one-var": "off",
79
79
  "prefer-default-export": "off",
80
80
  "prefer-destructuring": "off",
81
81
  "require-await": "off",
@@ -91,16 +91,32 @@ const baseRules = {
91
91
  "typescript/require-await": "warn",
92
92
  "typescript/non-nullable-type-assertion-style": "warn",
93
93
  "typescript/explicit-member-accessibility": "off",
94
+ "typescript/method-signature-style": "off",
94
95
  "typescript/return-await": ["warn", "always"],
96
+ "typescript/no-confusing-void-expression": ["warn", { ignoreArrowShorthand: true }],
95
97
  "import/no-unassigned-import": "warn",
96
98
  "import/consistent-type-specifier-style": "off",
97
99
  "import/no-anonymous-default-export": "off",
98
100
  "import/no-cycle": "off",
99
101
  "import/no-nodejs-modules": "off",
100
102
  "import/unambiguous": "off",
103
+ "node/no-top-level-await": "off",
104
+ "node/no-sync": ["warn", { ignores: ["execSync"] }],
105
+ "react/react-in-jsx-scope": "off",
106
+ "react/jsx-filename-extension": ["error", { extensions: ["jsx", "tsx"] }],
101
107
  "jest/require-hook": "off",
102
108
  "jest/no-conditional-in-test": "off",
109
+ "jest/prefer-expect-assertions": "off",
110
+ "vitest/prefer-called-times": "off",
103
111
  "vitest/prefer-strict-boolean-matchers": "off",
112
+ "vitest/prefer-expect-assertions": ["warn", {
113
+ onlyFunctionsWithExpectInCallback: true,
114
+ onlyFunctionsWithExpectInLoop: true
115
+ }],
116
+ "vitest/require-test-timeout": "off",
117
+ "vitest/no-importing-vitest-globals": "off",
118
+ "vitest/no-conditional-in-test": "off",
119
+ "vitest/no-hooks": "off",
104
120
  "jsdoc/require-param-type": "off",
105
121
  "jsdoc/require-returns": "off",
106
122
  "jsdoc/require-param": "off",
@@ -108,7 +124,21 @@ const baseRules = {
108
124
  "unicorn/switch-case-braces": ["warn", "avoid"],
109
125
  "unicorn/no-array-method-this-argument": "warn",
110
126
  "unicorn/no-await-expression-member": "warn",
111
- "vitest/no-importing-vitest-globals": "off",
127
+ "unicorn/no-invalid-fetch-options": "off",
128
+ "unicorn/import-style": ["warn", {
129
+ extendDefaultStyles: false,
130
+ styles: {
131
+ "path": {
132
+ named: true,
133
+ default: false
134
+ },
135
+ "util": {
136
+ named: true,
137
+ default: false
138
+ }
139
+ }
140
+ }],
141
+ "unicorn/max-nested-calls": ["warn", { max: 5 }],
112
142
  "comment-labs-js/no-self-assign": "error",
113
143
  "brettz9-js/arrow-parens": "off",
114
144
  "brettz9-js/block-scoped-var": "off",
@@ -118,7 +148,6 @@ const baseRules = {
118
148
  "brettz9-js/no-use-ignored-vars": "warn",
119
149
  "brettz9-js/no-useless-rest-spread": "warn",
120
150
  "brettz9-js/prefer-for-of": "off",
121
- "i18next-js/no-literal-string": "warn",
122
151
  "import-zod-js/prefer-zod-namespace": "warn",
123
152
  "security-js/detect-unsafe-regex": "error",
124
153
  "security-js/detect-non-literal-regexp": "error",
@@ -144,6 +173,106 @@ const baseRules = {
144
173
  "unicorn-js/prefer-switch": "warn",
145
174
  "unicorn-js/switch-case-break-position": "warn",
146
175
  "unicorn-js/prefer-single-call": "warn",
176
+ "jsdoc-js/check-alignment": "warn",
177
+ "jsdoc-js/check-indentation": "warn",
178
+ "jsdoc-js/check-line-alignment": "warn",
179
+ "jsdoc-js/check-param-names": "warn",
180
+ "jsdoc-js/check-types": "warn",
181
+ "jsdoc-js/check-values": "warn",
182
+ "jsdoc-js/multiline-blocks": "warn",
183
+ "jsdoc-js/no-multi-asterisks": "warn",
184
+ "jsdoc-js/no-undefined-types": "warn",
185
+ "jsdoc-js/require-returns-check": "warn",
186
+ "jsdoc-js/require-yields-check": "warn",
187
+ "jsdoc-js/tag-lines": "warn",
188
+ "jsdoc-js/valid-types": "warn",
189
+ "e18e-js/prefer-array-at": "error",
190
+ "e18e-js/prefer-array-fill": "error",
191
+ "e18e-js/prefer-includes": "error",
192
+ "e18e-js/prefer-array-to-reversed": "error",
193
+ "e18e-js/prefer-array-to-sorted": "error",
194
+ "e18e-js/prefer-array-to-spliced": "error",
195
+ "e18e-js/prefer-nullish-coalescing": "error",
196
+ "e18e-js/prefer-object-has-own": "error",
197
+ "e18e-js/prefer-spread-syntax": "error",
198
+ "e18e-js/prefer-url-canparse": "error",
199
+ "e18e-js/ban-dependencies": "error",
200
+ "e18e-js/prefer-array-from-map": "error",
201
+ "e18e-js/prefer-timer-args": "error",
202
+ "e18e-js/prefer-date-now": "error",
203
+ "e18e-js/prefer-regex-test": "error",
204
+ "e18e-js/prefer-array-some": "error",
205
+ "e18e-js/prefer-static-regex": "error",
206
+ "no-control-regex": "error",
207
+ "no-misleading-character-class": "error",
208
+ "no-regex-spaces": "error",
209
+ "no-invalid-regexp": "off",
210
+ "no-useless-backreference": "off",
211
+ "no-empty-character-class": "off",
212
+ "regexp-js/confusing-quantifier": "warn",
213
+ "regexp-js/control-character-escape": "error",
214
+ "regexp-js/match-any": "error",
215
+ "regexp-js/negation": "error",
216
+ "regexp-js/no-contradiction-with-assertion": "error",
217
+ "regexp-js/no-dupe-characters-character-class": "error",
218
+ "regexp-js/no-dupe-disjunctions": "error",
219
+ "regexp-js/no-empty-alternative": "warn",
220
+ "regexp-js/no-empty-capturing-group": "error",
221
+ "regexp-js/no-empty-character-class": "error",
222
+ "regexp-js/no-empty-group": "error",
223
+ "regexp-js/no-empty-lookarounds-assertion": "error",
224
+ "regexp-js/no-empty-string-literal": "error",
225
+ "regexp-js/no-escape-backspace": "error",
226
+ "regexp-js/no-extra-lookaround-assertions": "error",
227
+ "regexp-js/no-invalid-regexp": "error",
228
+ "regexp-js/no-invisible-character": "error",
229
+ "regexp-js/no-lazy-ends": "warn",
230
+ "regexp-js/no-legacy-features": "error",
231
+ "regexp-js/no-misleading-capturing-group": "error",
232
+ "regexp-js/no-misleading-unicode-character": "error",
233
+ "regexp-js/no-missing-g-flag": "error",
234
+ "regexp-js/no-non-standard-flag": "error",
235
+ "regexp-js/no-obscure-range": "error",
236
+ "regexp-js/no-optional-assertion": "error",
237
+ "regexp-js/no-potentially-useless-backreference": "warn",
238
+ "regexp-js/no-super-linear-backtracking": "error",
239
+ "regexp-js/no-trivially-nested-assertion": "error",
240
+ "regexp-js/no-trivially-nested-quantifier": "error",
241
+ "regexp-js/no-unused-capturing-group": "error",
242
+ "regexp-js/no-useless-assertions": "error",
243
+ "regexp-js/no-useless-backreference": "error",
244
+ "regexp-js/no-useless-character-class": "error",
245
+ "regexp-js/no-useless-dollar-replacements": "error",
246
+ "regexp-js/no-useless-escape": "error",
247
+ "regexp-js/no-useless-flag": "warn",
248
+ "regexp-js/no-useless-lazy": "error",
249
+ "regexp-js/no-useless-non-capturing-group": "error",
250
+ "regexp-js/no-useless-quantifier": "error",
251
+ "regexp-js/no-useless-range": "error",
252
+ "regexp-js/no-useless-set-operand": "error",
253
+ "regexp-js/no-useless-string-literal": "error",
254
+ "regexp-js/no-useless-two-nums-quantifier": "error",
255
+ "regexp-js/no-zero-quantifier": "error",
256
+ "regexp-js/optimal-lookaround-quantifier": "warn",
257
+ "regexp-js/optimal-quantifier-concatenation": "error",
258
+ "regexp-js/prefer-character-class": "error",
259
+ "regexp-js/prefer-d": "error",
260
+ "regexp-js/prefer-plus-quantifier": "error",
261
+ "regexp-js/prefer-predefined-assertion": "error",
262
+ "regexp-js/prefer-question-quantifier": "error",
263
+ "regexp-js/prefer-range": "error",
264
+ "regexp-js/prefer-set-operation": "error",
265
+ "regexp-js/prefer-star-quantifier": "error",
266
+ "regexp-js/prefer-unicode-codepoint-escapes": "error",
267
+ "regexp-js/prefer-w": "error",
268
+ "regexp-js/simplify-set-operations": "error",
269
+ "regexp-js/sort-flags": "error",
270
+ "regexp-js/strict": "error",
271
+ "regexp-js/use-ignore-case": "error"
272
+ };
273
+ //#endregion
274
+ //#region src/stylistic-rules.ts
275
+ const stylisticRules = {
147
276
  "stylistic-js/type-generic-spacing": "warn",
148
277
  "stylistic-js/type-named-tuple-spacing": "warn",
149
278
  "stylistic-js/function-call-spacing": ["warn", "never"],
@@ -388,103 +517,7 @@ const baseRules = {
388
517
  prev: "multiline-block-like",
389
518
  next: "*"
390
519
  }
391
- ],
392
- "jsdoc-js/check-alignment": "warn",
393
- "jsdoc-js/check-indentation": "warn",
394
- "jsdoc-js/check-line-alignment": "warn",
395
- "jsdoc-js/check-param-names": "warn",
396
- "jsdoc-js/check-types": "warn",
397
- "jsdoc-js/check-values": "warn",
398
- "jsdoc-js/multiline-blocks": "warn",
399
- "jsdoc-js/no-multi-asterisks": "warn",
400
- "jsdoc-js/no-undefined-types": "warn",
401
- "jsdoc-js/require-returns-check": "warn",
402
- "jsdoc-js/require-yields-check": "warn",
403
- "jsdoc-js/tag-lines": "warn",
404
- "jsdoc-js/valid-types": "warn",
405
- "e18e-js/prefer-array-at": "error",
406
- "e18e-js/prefer-array-fill": "error",
407
- "e18e-js/prefer-includes": "error",
408
- "e18e-js/prefer-array-to-reversed": "error",
409
- "e18e-js/prefer-array-to-sorted": "error",
410
- "e18e-js/prefer-array-to-spliced": "error",
411
- "e18e-js/prefer-nullish-coalescing": "error",
412
- "e18e-js/prefer-object-has-own": "error",
413
- "e18e-js/prefer-spread-syntax": "error",
414
- "e18e-js/prefer-url-canparse": "error",
415
- "e18e-js/ban-dependencies": "error",
416
- "e18e-js/prefer-array-from-map": "error",
417
- "e18e-js/prefer-timer-args": "error",
418
- "e18e-js/prefer-date-now": "error",
419
- "e18e-js/prefer-regex-test": "error",
420
- "e18e-js/prefer-array-some": "error",
421
- "e18e-js/prefer-static-regex": "error",
422
- "no-control-regex": "error",
423
- "no-misleading-character-class": "error",
424
- "no-regex-spaces": "error",
425
- "no-invalid-regexp": "off",
426
- "no-useless-backreference": "off",
427
- "no-empty-character-class": "off",
428
- "regexp-js/confusing-quantifier": "warn",
429
- "regexp-js/control-character-escape": "error",
430
- "regexp-js/match-any": "error",
431
- "regexp-js/negation": "error",
432
- "regexp-js/no-contradiction-with-assertion": "error",
433
- "regexp-js/no-dupe-characters-character-class": "error",
434
- "regexp-js/no-dupe-disjunctions": "error",
435
- "regexp-js/no-empty-alternative": "warn",
436
- "regexp-js/no-empty-capturing-group": "error",
437
- "regexp-js/no-empty-character-class": "error",
438
- "regexp-js/no-empty-group": "error",
439
- "regexp-js/no-empty-lookarounds-assertion": "error",
440
- "regexp-js/no-empty-string-literal": "error",
441
- "regexp-js/no-escape-backspace": "error",
442
- "regexp-js/no-extra-lookaround-assertions": "error",
443
- "regexp-js/no-invalid-regexp": "error",
444
- "regexp-js/no-invisible-character": "error",
445
- "regexp-js/no-lazy-ends": "warn",
446
- "regexp-js/no-legacy-features": "error",
447
- "regexp-js/no-misleading-capturing-group": "error",
448
- "regexp-js/no-misleading-unicode-character": "error",
449
- "regexp-js/no-missing-g-flag": "error",
450
- "regexp-js/no-non-standard-flag": "error",
451
- "regexp-js/no-obscure-range": "error",
452
- "regexp-js/no-optional-assertion": "error",
453
- "regexp-js/no-potentially-useless-backreference": "warn",
454
- "regexp-js/no-super-linear-backtracking": "error",
455
- "regexp-js/no-trivially-nested-assertion": "error",
456
- "regexp-js/no-trivially-nested-quantifier": "error",
457
- "regexp-js/no-unused-capturing-group": "error",
458
- "regexp-js/no-useless-assertions": "error",
459
- "regexp-js/no-useless-backreference": "error",
460
- "regexp-js/no-useless-character-class": "error",
461
- "regexp-js/no-useless-dollar-replacements": "error",
462
- "regexp-js/no-useless-escape": "error",
463
- "regexp-js/no-useless-flag": "warn",
464
- "regexp-js/no-useless-lazy": "error",
465
- "regexp-js/no-useless-non-capturing-group": "error",
466
- "regexp-js/no-useless-quantifier": "error",
467
- "regexp-js/no-useless-range": "error",
468
- "regexp-js/no-useless-set-operand": "error",
469
- "regexp-js/no-useless-string-literal": "error",
470
- "regexp-js/no-useless-two-nums-quantifier": "error",
471
- "regexp-js/no-zero-quantifier": "error",
472
- "regexp-js/optimal-lookaround-quantifier": "warn",
473
- "regexp-js/optimal-quantifier-concatenation": "error",
474
- "regexp-js/prefer-character-class": "error",
475
- "regexp-js/prefer-d": "error",
476
- "regexp-js/prefer-plus-quantifier": "error",
477
- "regexp-js/prefer-predefined-assertion": "error",
478
- "regexp-js/prefer-question-quantifier": "error",
479
- "regexp-js/prefer-range": "error",
480
- "regexp-js/prefer-set-operation": "error",
481
- "regexp-js/prefer-star-quantifier": "error",
482
- "regexp-js/prefer-unicode-codepoint-escapes": "error",
483
- "regexp-js/prefer-w": "error",
484
- "regexp-js/simplify-set-operations": "error",
485
- "regexp-js/sort-flags": "error",
486
- "regexp-js/strict": "error",
487
- "regexp-js/use-ignore-case": "error"
520
+ ]
488
521
  };
489
522
  //#endregion
490
523
  //#region src/plugins.ts
@@ -506,7 +539,7 @@ const plugins = [
506
539
  //#endregion
507
540
  //#region src/utils.ts
508
541
  async function enableMode(configFiles, dependencies) {
509
- if ((await Promise.all(configFiles.map(async (file) => access(join(cwd(), file)).then(() => true).catch(() => false)))).some(Boolean)) return true;
542
+ if ((await Promise.all(configFiles.map(async (file) => await access(join(cwd(), file)).then(() => true).catch(() => false)))).some(Boolean)) return true;
510
543
  const packageJson = up("package.json", { cwd: cwd() });
511
544
  if (typeof packageJson === "string") {
512
545
  const json = JSON.parse(await readFile(packageJson, "utf8"));
@@ -555,6 +588,156 @@ async function getGlobals() {
555
588
  ], ["@cloudflare/workers-types", "wrangler"])) return cloudflare;
556
589
  return base;
557
590
  }
591
+ const globals = await getGlobals();
592
+ //#endregion
593
+ //#region src/js-plugins.ts
594
+ const jsPlugins = [
595
+ {
596
+ name: "comment-labs-js",
597
+ specifier: "@comment-labs/oxlint-config/plugins/labs"
598
+ },
599
+ {
600
+ name: "brettz9-js",
601
+ specifier: "@comment-labs/oxlint-config/plugins/brettz9"
602
+ },
603
+ {
604
+ name: "i18next-js",
605
+ specifier: "@comment-labs/oxlint-config/plugins/i18next"
606
+ },
607
+ {
608
+ name: "import-zod-js",
609
+ specifier: "@comment-labs/oxlint-config/plugins/import-zod"
610
+ },
611
+ {
612
+ name: "playwright-js",
613
+ specifier: "@comment-labs/oxlint-config/plugins/playwright"
614
+ },
615
+ {
616
+ name: "react-hooks-js",
617
+ specifier: "@comment-labs/oxlint-config/plugins/react-hooks"
618
+ },
619
+ {
620
+ name: "react-native-js",
621
+ specifier: "@comment-labs/oxlint-config/plugins/react-native"
622
+ },
623
+ {
624
+ name: "react-refresh-js",
625
+ specifier: "@comment-labs/oxlint-config/plugins/react-refresh"
626
+ },
627
+ {
628
+ name: "security-js",
629
+ specifier: "@comment-labs/oxlint-config/plugins/security"
630
+ },
631
+ {
632
+ name: "unicorn-js",
633
+ specifier: "@comment-labs/oxlint-config/plugins/unicorn"
634
+ },
635
+ {
636
+ name: "stylistic-js",
637
+ specifier: "@comment-labs/oxlint-config/plugins/stylistic"
638
+ },
639
+ {
640
+ name: "jsdoc-js",
641
+ specifier: "@comment-labs/oxlint-config/plugins/jsdoc"
642
+ },
643
+ {
644
+ name: "e18e-js",
645
+ specifier: "@comment-labs/oxlint-config/plugins/e18e"
646
+ },
647
+ {
648
+ name: "regexp-js",
649
+ specifier: "@comment-labs/oxlint-config/plugins/regexp"
650
+ }
651
+ ];
652
+ const i18nextOverrides = {
653
+ files: [await enableMode([], ["i18next"]) ? "**/*" : "___disabled"],
654
+ rules: { "i18next-js/no-literal-string": "warn" }
655
+ };
656
+ //#endregion
657
+ //#region src/overrides/playwright.ts
658
+ const playwrightOverrides = {
659
+ files: ["**/e2e/**/*"],
660
+ rules: {
661
+ "playwright-js/consistent-spacing-between-blocks": "warn",
662
+ "playwright-js/expect-expect": "warn",
663
+ "playwright-js/max-nested-describe": "warn",
664
+ "playwright-js/missing-playwright-await": "error",
665
+ "playwright-js/no-conditional-expect": "warn",
666
+ "playwright-js/no-conditional-in-test": "warn",
667
+ "playwright-js/no-duplicate-hooks": "warn",
668
+ "playwright-js/no-duplicate-slow": "warn",
669
+ "playwright-js/no-element-handle": "warn",
670
+ "playwright-js/no-eval": "warn",
671
+ "playwright-js/no-focused-test": "error",
672
+ "playwright-js/no-force-option": "warn",
673
+ "playwright-js/no-nested-step": "warn",
674
+ "playwright-js/no-networkidle": "error",
675
+ "playwright-js/no-page-pause": "warn",
676
+ "playwright-js/no-skipped-test": "warn",
677
+ "playwright-js/no-standalone-expect": "error",
678
+ "playwright-js/no-unsafe-references": "error",
679
+ "playwright-js/no-unused-locators": "error",
680
+ "playwright-js/no-useless-await": "warn",
681
+ "playwright-js/no-useless-not": "warn",
682
+ "playwright-js/no-wait-for-navigation": "error",
683
+ "playwright-js/no-wait-for-selector": "warn",
684
+ "playwright-js/no-wait-for-timeout": "warn",
685
+ "playwright-js/prefer-hooks-in-order": "warn",
686
+ "playwright-js/prefer-hooks-on-top": "warn",
687
+ "playwright-js/prefer-locator": "warn",
688
+ "playwright-js/prefer-to-have-count": "warn",
689
+ "playwright-js/prefer-to-have-length": "warn",
690
+ "playwright-js/prefer-web-first-assertions": "error",
691
+ "playwright-js/valid-describe-callback": "error",
692
+ "playwright-js/valid-expect": "error",
693
+ "playwright-js/valid-expect-in-promise": "error",
694
+ "playwright-js/valid-test-tags": "error",
695
+ "playwright-js/valid-title": "error"
696
+ }
697
+ };
698
+ //#endregion
699
+ //#region src/overrides/react.ts
700
+ const reactOverrides = {
701
+ files: ["**/*.?(c|m)@(j|t)sx"],
702
+ rules: {
703
+ "react-hooks-js/exhaustive-deps": "error",
704
+ "react-hooks-js/rules-of-hooks": "warn",
705
+ "react-refresh-js/only-export-components": "warn"
706
+ }
707
+ };
708
+ const reactNativeOverrides = {
709
+ files: [await enableMode([], ["react-native"]) ? "**/*.?(m)@(j|t)sx" : "___disabled"],
710
+ rules: {
711
+ "react-native-js/no-color-literals": "warn",
712
+ "react-native-js/no-inline-styles": "warn",
713
+ "react-native-js/no-raw-text": "off",
714
+ "react-native-js/no-single-element-style-arrays": "warn",
715
+ "react-native-js/no-unused-styles": "warn",
716
+ "react-native-js/sort-styles": "off",
717
+ "react-native-js/split-platform-components": "error"
718
+ }
719
+ };
720
+ //#endregion
721
+ //#region src/overrides/scripts.ts
722
+ const scriptsOverrides = {
723
+ files: ["scripts/**/*.?(m)@(j|t)s"],
724
+ rules: { "unicorn/no-process-exit": "warn" }
725
+ };
726
+ //#endregion
727
+ //#region src/overrides/declarations.ts
728
+ const declarationsOverrides = {
729
+ files: ["**/*.d.ts"],
730
+ rules: {
731
+ "typescript/no-empty-interface": "off",
732
+ "typescript/no-empty-object-type": "off"
733
+ }
734
+ };
735
+ //#endregion
736
+ //#region src/overrides/ambient.ts
737
+ const ambientOverrides = {
738
+ files: ["**/src/env.d.ts", "**/src/environment.d.ts"],
739
+ rules: { "no-redeclare": "off" }
740
+ };
558
741
  //#endregion
559
742
  //#region src/index.ts
560
743
  const config = {
@@ -564,129 +747,22 @@ const config = {
564
747
  typeCheck: true
565
748
  },
566
749
  plugins,
567
- jsPlugins: [
568
- {
569
- name: "comment-labs-js",
570
- specifier: "@comment-labs/oxlint-config/plugins/labs"
571
- },
572
- {
573
- name: "brettz9-js",
574
- specifier: "@comment-labs/oxlint-config/plugins/brettz9"
575
- },
576
- {
577
- name: "i18next-js",
578
- specifier: "@comment-labs/oxlint-config/plugins/i18next"
579
- },
580
- {
581
- name: "import-zod-js",
582
- specifier: "@comment-labs/oxlint-config/plugins/import-zod"
583
- },
584
- {
585
- name: "playwright-js",
586
- specifier: "@comment-labs/oxlint-config/plugins/playwright"
587
- },
588
- {
589
- name: "react-hooks-js",
590
- specifier: "@comment-labs/oxlint-config/plugins/react-hooks"
591
- },
592
- {
593
- name: "react-native-js",
594
- specifier: "@comment-labs/oxlint-config/plugins/react-native"
595
- },
596
- {
597
- name: "react-refresh-js",
598
- specifier: "@comment-labs/oxlint-config/plugins/react-refresh"
599
- },
600
- {
601
- name: "security-js",
602
- specifier: "@comment-labs/oxlint-config/plugins/security"
603
- },
604
- {
605
- name: "unicorn-js",
606
- specifier: "@comment-labs/oxlint-config/plugins/unicorn"
607
- },
608
- {
609
- name: "stylistic-js",
610
- specifier: "@comment-labs/oxlint-config/plugins/stylistic"
611
- },
612
- {
613
- name: "jsdoc-js",
614
- specifier: "@comment-labs/oxlint-config/plugins/jsdoc"
615
- },
616
- {
617
- name: "e18e-js",
618
- specifier: "@comment-labs/oxlint-config/plugins/e18e"
619
- },
620
- {
621
- name: "regexp-js",
622
- specifier: "@comment-labs/oxlint-config/plugins/regexp"
623
- }
624
- ],
625
- rules: baseRules,
626
- globals: await getGlobals(),
750
+ jsPlugins,
751
+ rules: {
752
+ ...baseRules,
753
+ ...stylisticRules
754
+ },
755
+ globals,
627
756
  categories,
628
757
  settings: { vitest: { typecheck: true } },
629
758
  overrides: [
630
- {
631
- files: ["**/e2e/**/*"],
632
- rules: {
633
- "playwright-js/consistent-spacing-between-blocks": "warn",
634
- "playwright-js/expect-expect": "warn",
635
- "playwright-js/max-nested-describe": "warn",
636
- "playwright-js/missing-playwright-await": "error",
637
- "playwright-js/no-conditional-expect": "warn",
638
- "playwright-js/no-conditional-in-test": "warn",
639
- "playwright-js/no-duplicate-hooks": "warn",
640
- "playwright-js/no-duplicate-slow": "warn",
641
- "playwright-js/no-element-handle": "warn",
642
- "playwright-js/no-eval": "warn",
643
- "playwright-js/no-focused-test": "error",
644
- "playwright-js/no-force-option": "warn",
645
- "playwright-js/no-nested-step": "warn",
646
- "playwright-js/no-networkidle": "error",
647
- "playwright-js/no-page-pause": "warn",
648
- "playwright-js/no-skipped-test": "warn",
649
- "playwright-js/no-standalone-expect": "error",
650
- "playwright-js/no-unsafe-references": "error",
651
- "playwright-js/no-unused-locators": "error",
652
- "playwright-js/no-useless-await": "warn",
653
- "playwright-js/no-useless-not": "warn",
654
- "playwright-js/no-wait-for-navigation": "error",
655
- "playwright-js/no-wait-for-selector": "warn",
656
- "playwright-js/no-wait-for-timeout": "warn",
657
- "playwright-js/prefer-hooks-in-order": "warn",
658
- "playwright-js/prefer-hooks-on-top": "warn",
659
- "playwright-js/prefer-locator": "warn",
660
- "playwright-js/prefer-to-have-count": "warn",
661
- "playwright-js/prefer-to-have-length": "warn",
662
- "playwright-js/prefer-web-first-assertions": "error",
663
- "playwright-js/valid-describe-callback": "error",
664
- "playwright-js/valid-expect": "error",
665
- "playwright-js/valid-expect-in-promise": "error",
666
- "playwright-js/valid-test-tags": "error",
667
- "playwright-js/valid-title": "error"
668
- }
669
- },
670
- {
671
- files: ["**/*.?(c|m)@(j|t)sx"],
672
- rules: {
673
- "react-hooks-js/exhaustive-deps": "error",
674
- "react-hooks-js/rules-of-hooks": "warn",
675
- "react-refresh-js/only-export-components": "warn"
676
- }
677
- },
678
- {
679
- files: [await enableMode([], ["react-native"]) ? "**/*.?(m)@(j|t)sx" : "___disabled"],
680
- rules: {
681
- "react-native-js/no-color-literals": "warn",
682
- "react-native-js/no-inline-styles": "warn",
683
- "react-native-js/no-raw-text": "off",
684
- "react-native-js/no-single-element-style-arrays": "warn",
685
- "react-native-js/no-unused-styles": "warn",
686
- "react-native-js/sort-styles": "off",
687
- "react-native-js/split-platform-components": "error"
688
- }
689
- }
759
+ declarationsOverrides,
760
+ ambientOverrides,
761
+ i18nextOverrides,
762
+ playwrightOverrides,
763
+ reactOverrides,
764
+ reactNativeOverrides,
765
+ scriptsOverrides
690
766
  ],
691
767
  ignorePatterns: [
692
768
  "coverage/**",