eslint-config-setup 0.3.3 → 0.5.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.
@@ -24,9 +24,10 @@ export default [
24
24
  // TypeScript parser setup
25
25
  ...tseslint.configs.strictTypeChecked.slice(0, 2),
26
26
 
27
- // Base rules — all effective rules for *.ts files
27
+ // Base rules — all effective rules for TS plus shared JS/TS rules
28
28
  {
29
29
  name: "eslint-config-setup/base",
30
+ ignores: ["**/*.{md,mdx}"],
30
31
  plugins: {
31
32
  "@cspell": cspellPlugin,
32
33
  "@typescript-eslint": tseslint.plugin,
@@ -68,7 +69,7 @@ export default [
68
69
  "@typescript-eslint/ban-ts-comment": [
69
70
  "error",
70
71
  {
71
- "minimumDescriptionLength": 10
72
+ "ts-expect-error": "allow-with-description"
72
73
  }
73
74
  ],
74
75
  "@typescript-eslint/ban-tslint-comment": "error",
@@ -76,7 +77,10 @@ export default [
76
77
  "@typescript-eslint/consistent-generic-constructors": "error",
77
78
  "@typescript-eslint/consistent-indexed-object-style": "error",
78
79
  "@typescript-eslint/consistent-type-assertions": "error",
79
- "@typescript-eslint/consistent-type-definitions": "error",
80
+ "@typescript-eslint/consistent-type-definitions": [
81
+ "error",
82
+ "type"
83
+ ],
80
84
  "@typescript-eslint/consistent-type-exports": [
81
85
  "error",
82
86
  {
@@ -86,10 +90,14 @@ export default [
86
90
  "@typescript-eslint/consistent-type-imports": [
87
91
  "error",
88
92
  {
89
- "fixStyle": "inline-type-imports"
93
+ "fixStyle": "separate-type-imports"
90
94
  }
91
95
  ],
92
96
  "@typescript-eslint/dot-notation": "error",
97
+ "@typescript-eslint/method-signature-style": [
98
+ "error",
99
+ "property"
100
+ ],
93
101
  "@typescript-eslint/no-array-constructor": "error",
94
102
  "@typescript-eslint/no-array-delete": "error",
95
103
  "@typescript-eslint/no-base-to-string": "error",
@@ -101,10 +109,21 @@ export default [
101
109
  "@typescript-eslint/no-dynamic-delete": "error",
102
110
  "@typescript-eslint/no-empty-function": "error",
103
111
  "@typescript-eslint/no-empty-object-type": "error",
104
- "@typescript-eslint/no-explicit-any": "error",
112
+ "@typescript-eslint/no-explicit-any": [
113
+ "warn",
114
+ {
115
+ "fixToUnknown": true
116
+ }
117
+ ],
105
118
  "@typescript-eslint/no-extra-non-null-assertion": "error",
106
119
  "@typescript-eslint/no-extraneous-class": "error",
107
- "@typescript-eslint/no-floating-promises": "error",
120
+ "@typescript-eslint/no-floating-promises": [
121
+ "error",
122
+ {
123
+ "checkThenables": true,
124
+ "ignoreIIFE": true
125
+ }
126
+ ],
108
127
  "@typescript-eslint/no-for-in-array": "error",
109
128
  "@typescript-eslint/no-implied-eval": "error",
110
129
  "@typescript-eslint/no-import-type-side-effects": "error",
@@ -155,6 +174,7 @@ export default [
155
174
  "@typescript-eslint/no-unsafe-function-type": "error",
156
175
  "@typescript-eslint/no-unsafe-member-access": "error",
157
176
  "@typescript-eslint/no-unsafe-return": "error",
177
+ "@typescript-eslint/no-unsafe-type-assertion": "error",
158
178
  "@typescript-eslint/no-unsafe-unary-minus": "error",
159
179
  "@typescript-eslint/no-unused-expressions": "error",
160
180
  "@typescript-eslint/no-unused-vars": [
@@ -185,11 +205,19 @@ export default [
185
205
  "@typescript-eslint/prefer-nullish-coalescing": "error",
186
206
  "@typescript-eslint/prefer-optional-chain": "error",
187
207
  "@typescript-eslint/prefer-promise-reject-errors": "error",
208
+ "@typescript-eslint/prefer-readonly": "warn",
188
209
  "@typescript-eslint/prefer-reduce-type-parameter": "error",
189
210
  "@typescript-eslint/prefer-regexp-exec": "error",
190
211
  "@typescript-eslint/prefer-return-this-type": "error",
191
212
  "@typescript-eslint/prefer-string-starts-ends-with": "error",
213
+ "@typescript-eslint/promise-function-async": "error",
192
214
  "@typescript-eslint/related-getter-setter-pairs": "error",
215
+ "@typescript-eslint/require-array-sort-compare": [
216
+ "error",
217
+ {
218
+ "ignoreStringArrays": true
219
+ }
220
+ ],
193
221
  "@typescript-eslint/require-await": "error",
194
222
  "@typescript-eslint/restrict-plus-operands": [
195
223
  "error",
@@ -219,6 +247,13 @@ export default [
219
247
  }
220
248
  ],
221
249
  "@typescript-eslint/strict-void-return": "error",
250
+ "@typescript-eslint/switch-exhaustiveness-check": [
251
+ "error",
252
+ {
253
+ "allowDefaultCaseForExhaustiveSwitch": false,
254
+ "requireDefaultForNonUnion": true
255
+ }
256
+ ],
222
257
  "@typescript-eslint/triple-slash-reference": "error",
223
258
  "@typescript-eslint/unbound-method": "error",
224
259
  "@typescript-eslint/unified-signatures": "error",
@@ -262,17 +297,35 @@ export default [
262
297
  "maxDepth": 3
263
298
  }
264
299
  ],
265
- "import/no-duplicates": [
300
+ "import/no-duplicates": "error",
301
+ "import/no-empty-named-blocks": "error",
302
+ "import/no-extraneous-dependencies": [
266
303
  "error",
267
304
  {
268
- "prefer-inline": true
305
+ "includeTypes": true
269
306
  }
270
307
  ],
271
- "import/no-empty-named-blocks": "error",
272
308
  "import/no-mutable-exports": "error",
273
309
  "import/no-named-as-default": "error",
274
310
  "import/no-named-as-default-member": "error",
311
+ "import/no-named-default": "error",
275
312
  "import/no-self-import": "error",
313
+ "import/no-unassigned-import": [
314
+ "error",
315
+ {
316
+ "allow": [
317
+ "@babel/polyfill",
318
+ "**/register",
319
+ "**/register.*",
320
+ "**/register/**",
321
+ "**/register/**.*",
322
+ "**/*.css",
323
+ "**/*.scss",
324
+ "**/*.sass",
325
+ "**/*.less"
326
+ ]
327
+ }
328
+ ],
276
329
  "import/no-useless-path-segments": "error",
277
330
  "jsdoc/check-access": "error",
278
331
  "jsdoc/check-alignment": "error",
@@ -360,6 +413,7 @@ export default [
360
413
  "no-extra-boolean-cast": "error",
361
414
  "no-fallthrough": "error",
362
415
  "no-global-assign": "error",
416
+ "no-implicit-globals": "error",
363
417
  "no-irregular-whitespace": "error",
364
418
  "no-iterator": "error",
365
419
  "no-labels": "error",
@@ -378,10 +432,19 @@ export default [
378
432
  "no-proto": "error",
379
433
  "no-prototype-builtins": "error",
380
434
  "no-regex-spaces": "error",
435
+ "no-return-assign": [
436
+ "error",
437
+ "always"
438
+ ],
381
439
  "no-script-url": "error",
382
440
  "no-self-assign": "error",
383
441
  "no-self-compare": "error",
384
- "no-sequences": "error",
442
+ "no-sequences": [
443
+ "error",
444
+ {
445
+ "allowInParentheses": false
446
+ }
447
+ ],
385
448
  "no-shadow-restricted-names": "error",
386
449
  "no-sparse-arrays": "error",
387
450
  "no-template-curly-in-string": "error",
@@ -395,12 +458,25 @@ export default [
395
458
  "no-useless-assignment": "error",
396
459
  "no-useless-call": "error",
397
460
  "no-useless-catch": "error",
398
- "no-useless-computed-key": "error",
461
+ "no-useless-computed-key": [
462
+ "error",
463
+ {
464
+ "enforceForClassMembers": true
465
+ }
466
+ ],
399
467
  "no-useless-concat": "error",
400
468
  "no-useless-escape": "error",
401
469
  "no-useless-rename": "error",
402
470
  "no-useless-return": "error",
403
471
  "no-var": "error",
472
+ "object-shorthand": [
473
+ "error",
474
+ "always",
475
+ {
476
+ "avoidExplicitReturnArrows": true,
477
+ "avoidQuotes": true
478
+ }
479
+ ],
404
480
  "perfectionist/sort-exports": "error",
405
481
  "perfectionist/sort-imports": [
406
482
  "error",
@@ -413,12 +489,13 @@ export default [
413
489
  "perfectionist/sort-named-imports": "error",
414
490
  "perfectionist/sort-union-types": "error",
415
491
  "prefer-const": "error",
492
+ "prefer-numeric-literals": "error",
416
493
  "prefer-object-has-own": "error",
417
494
  "prefer-object-spread": "error",
418
495
  "prefer-regex-literals": "error",
419
496
  "prefer-rest-params": "error",
420
497
  "prefer-spread": "error",
421
- "prefer-template": "error",
498
+ "prefer-template": "warn",
422
499
  "preserve-caught-error": "error",
423
500
  "radix": "error",
424
501
  "regexp/confusing-quantifier": "warn",
@@ -535,15 +612,31 @@ export default [
535
612
  "unicorn/consistent-date-clone": "error",
536
613
  "unicorn/consistent-empty-array-spread": "error",
537
614
  "unicorn/consistent-existence-index-check": "error",
615
+ "unicorn/consistent-function-scoping": "warn",
538
616
  "unicorn/error-message": "error",
617
+ "unicorn/filename-case": [
618
+ "error",
619
+ {
620
+ "cases": {
621
+ "camelCase": true,
622
+ "pascalCase": true,
623
+ "kebabCase": true
624
+ },
625
+ "ignore": [
626
+ "__tests__"
627
+ ]
628
+ }
629
+ ],
539
630
  "unicorn/new-for-builtins": "error",
540
631
  "unicorn/no-abusive-eslint-disable": "error",
541
632
  "unicorn/no-accessor-recursion": "error",
542
633
  "unicorn/no-anonymous-default-export": "error",
543
634
  "unicorn/no-array-callback-reference": "error",
544
635
  "unicorn/no-array-method-this-argument": "error",
636
+ "unicorn/no-array-reduce": "warn",
545
637
  "unicorn/no-await-expression-member": "error",
546
638
  "unicorn/no-await-in-promise-methods": "error",
639
+ "unicorn/no-for-loop": "warn",
547
640
  "unicorn/no-instanceof-builtins": "error",
548
641
  "unicorn/no-invalid-fetch-options": "error",
549
642
  "unicorn/no-invalid-remove-event-listener": "error",
@@ -561,7 +654,12 @@ export default [
561
654
  "unicorn/no-useless-length-check": "error",
562
655
  "unicorn/no-useless-promise-resolve-reject": "error",
563
656
  "unicorn/no-useless-spread": "error",
564
- "unicorn/no-useless-undefined": "error",
657
+ "unicorn/no-useless-undefined": [
658
+ "warn",
659
+ {
660
+ "checkArguments": false
661
+ }
662
+ ],
565
663
  "unicorn/no-zero-fractions": "error",
566
664
  "unicorn/numeric-separators-style": "error",
567
665
  "unicorn/prefer-array-find": "error",
@@ -571,10 +669,11 @@ export default [
571
669
  "unicorn/prefer-array-some": "error",
572
670
  "unicorn/prefer-at": "error",
573
671
  "unicorn/prefer-date-now": "error",
672
+ "unicorn/prefer-dom-node-dataset": "error",
574
673
  "unicorn/prefer-export-from": [
575
674
  "error",
576
675
  {
577
- "ignoreUsedVariables": true
676
+ "checkUsedVariables": false
578
677
  }
579
678
  ],
580
679
  "unicorn/prefer-global-this": "error",
@@ -602,8 +701,19 @@ export default [
602
701
  "unicorn/text-encoding-identifier-case": "error",
603
702
  "unicorn/throw-new-error": "error",
604
703
  "unused-imports/no-unused-imports": "error",
605
- "use-isnan": "error",
606
- "valid-typeof": "error",
704
+ "use-isnan": [
705
+ "error",
706
+ {
707
+ "enforceForIndexOf": true,
708
+ "enforceForSwitchCase": true
709
+ }
710
+ ],
711
+ "valid-typeof": [
712
+ "error",
713
+ {
714
+ "requireStringLiterals": true
715
+ }
716
+ ],
607
717
  "yoda": "error"
608
718
  },
609
719
  },
@@ -613,46 +723,91 @@ export default [
613
723
  name: "eslint-config-setup/js-compat",
614
724
  files: ["**/*.{js,mjs,cjs}"],
615
725
  rules: {
726
+ "@typescript-eslint/adjacent-overload-signatures": "off",
727
+ "@typescript-eslint/array-type": "off",
616
728
  "@typescript-eslint/await-thenable": "off",
729
+ "@typescript-eslint/ban-ts-comment": "off",
730
+ "@typescript-eslint/ban-tslint-comment": "off",
731
+ "@typescript-eslint/class-literal-property-style": "off",
732
+ "@typescript-eslint/consistent-generic-constructors": "off",
733
+ "@typescript-eslint/consistent-indexed-object-style": "off",
617
734
  "@typescript-eslint/consistent-return": "off",
735
+ "@typescript-eslint/consistent-type-assertions": "off",
736
+ "@typescript-eslint/consistent-type-definitions": "off",
618
737
  "@typescript-eslint/consistent-type-exports": "off",
738
+ "@typescript-eslint/consistent-type-imports": "off",
619
739
  "@typescript-eslint/dot-notation": "off",
740
+ "@typescript-eslint/method-signature-style": "off",
620
741
  "@typescript-eslint/naming-convention": "off",
742
+ "@typescript-eslint/no-array-constructor": "off",
621
743
  "@typescript-eslint/no-array-delete": "off",
622
744
  "@typescript-eslint/no-base-to-string": "off",
745
+ "@typescript-eslint/no-confusing-non-null-assertion": "off",
623
746
  "@typescript-eslint/no-confusing-void-expression": "off",
624
747
  "@typescript-eslint/no-deprecated": "off",
748
+ "@typescript-eslint/no-duplicate-enum-values": "off",
625
749
  "@typescript-eslint/no-duplicate-type-constituents": "off",
750
+ "@typescript-eslint/no-dynamic-delete": "off",
751
+ "@typescript-eslint/no-empty-function": "off",
752
+ "@typescript-eslint/no-empty-object-type": "off",
753
+ "@typescript-eslint/no-explicit-any": "off",
754
+ "@typescript-eslint/no-extra-non-null-assertion": "off",
755
+ "@typescript-eslint/no-extraneous-class": "off",
626
756
  "@typescript-eslint/no-floating-promises": "off",
627
757
  "@typescript-eslint/no-for-in-array": "off",
628
758
  "@typescript-eslint/no-implied-eval": "off",
759
+ "@typescript-eslint/no-import-type-side-effects": "off",
760
+ "@typescript-eslint/no-inferrable-types": "off",
761
+ "@typescript-eslint/no-invalid-void-type": "off",
629
762
  "@typescript-eslint/no-meaningless-void-operator": "off",
763
+ "@typescript-eslint/no-misused-new": "off",
630
764
  "@typescript-eslint/no-misused-promises": "off",
631
765
  "@typescript-eslint/no-misused-spread": "off",
632
766
  "@typescript-eslint/no-mixed-enums": "off",
767
+ "@typescript-eslint/no-namespace": "off",
768
+ "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "off",
769
+ "@typescript-eslint/no-non-null-asserted-optional-chain": "off",
770
+ "@typescript-eslint/no-non-null-assertion": "off",
633
771
  "@typescript-eslint/no-redundant-type-constituents": "off",
772
+ "@typescript-eslint/no-require-imports": "off",
773
+ "@typescript-eslint/no-shadow": "off",
774
+ "@typescript-eslint/no-this-alias": "off",
634
775
  "@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
635
776
  "@typescript-eslint/no-unnecessary-condition": "off",
777
+ "@typescript-eslint/no-unnecessary-parameter-property-assignment": "off",
636
778
  "@typescript-eslint/no-unnecessary-qualifier": "off",
637
779
  "@typescript-eslint/no-unnecessary-template-expression": "off",
638
780
  "@typescript-eslint/no-unnecessary-type-arguments": "off",
639
781
  "@typescript-eslint/no-unnecessary-type-assertion": "off",
782
+ "@typescript-eslint/no-unnecessary-type-constraint": "off",
640
783
  "@typescript-eslint/no-unnecessary-type-conversion": "off",
641
784
  "@typescript-eslint/no-unnecessary-type-parameters": "off",
642
785
  "@typescript-eslint/no-unsafe-argument": "off",
643
786
  "@typescript-eslint/no-unsafe-assignment": "off",
644
787
  "@typescript-eslint/no-unsafe-call": "off",
788
+ "@typescript-eslint/no-unsafe-declaration-merging": "off",
645
789
  "@typescript-eslint/no-unsafe-enum-comparison": "off",
790
+ "@typescript-eslint/no-unsafe-function-type": "off",
646
791
  "@typescript-eslint/no-unsafe-member-access": "off",
647
792
  "@typescript-eslint/no-unsafe-return": "off",
648
793
  "@typescript-eslint/no-unsafe-type-assertion": "off",
649
794
  "@typescript-eslint/no-unsafe-unary-minus": "off",
795
+ "@typescript-eslint/no-unused-expressions": "off",
796
+ "@typescript-eslint/no-unused-vars": "off",
797
+ "@typescript-eslint/no-useless-constructor": "off",
650
798
  "@typescript-eslint/no-useless-default-assignment": "off",
799
+ "@typescript-eslint/no-useless-empty-export": "off",
800
+ "@typescript-eslint/no-wrapper-object-types": "off",
651
801
  "@typescript-eslint/non-nullable-type-assertion-style": "off",
652
802
  "@typescript-eslint/only-throw-error": "off",
803
+ "@typescript-eslint/prefer-as-const": "off",
653
804
  "@typescript-eslint/prefer-destructuring": "off",
654
805
  "@typescript-eslint/prefer-find": "off",
806
+ "@typescript-eslint/prefer-for-of": "off",
807
+ "@typescript-eslint/prefer-function-type": "off",
655
808
  "@typescript-eslint/prefer-includes": "off",
809
+ "@typescript-eslint/prefer-literal-enum-member": "off",
810
+ "@typescript-eslint/prefer-namespace-keyword": "off",
656
811
  "@typescript-eslint/prefer-nullish-coalescing": "off",
657
812
  "@typescript-eslint/prefer-optional-chain": "off",
658
813
  "@typescript-eslint/prefer-promise-reject-errors": "off",
@@ -672,33 +827,47 @@ export default [
672
827
  "@typescript-eslint/strict-boolean-expressions": "off",
673
828
  "@typescript-eslint/strict-void-return": "off",
674
829
  "@typescript-eslint/switch-exhaustiveness-check": "off",
830
+ "@typescript-eslint/triple-slash-reference": "off",
675
831
  "@typescript-eslint/unbound-method": "off",
832
+ "@typescript-eslint/unified-signatures": "off",
676
833
  "@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
677
834
  "constructor-super": "error",
835
+ "dot-notation": "off",
678
836
  "getter-return": "error",
837
+ "no-array-constructor": "off",
679
838
  "no-class-assign": "error",
680
839
  "no-const-assign": "error",
681
840
  "no-dupe-args": "error",
682
841
  "no-dupe-class-members": "error",
683
842
  "no-dupe-keys": "error",
843
+ "no-empty-function": "off",
684
844
  "no-func-assign": "error",
845
+ "no-implied-eval": "off",
685
846
  "no-import-assign": "error",
686
847
  "no-new-native-nonconstructor": "error",
687
848
  "no-new-symbol": "off",
688
849
  "no-obj-calls": "error",
689
850
  "no-redeclare": "error",
851
+ "no-return-await": "off",
690
852
  "no-setter-return": "error",
853
+ "no-shadow": "off",
691
854
  "no-this-before-super": "error",
855
+ "no-throw-literal": "off",
692
856
  "no-undef": "error",
693
857
  "no-unreachable": "error",
694
858
  "no-unsafe-negation": "error",
859
+ "no-unused-expressions": "off",
860
+ "no-unused-vars": "error",
861
+ "no-useless-constructor": "off",
695
862
  "no-with": "error",
696
863
  "prefer-const": [
697
864
  "error",
698
865
  {
699
866
  "destructuring": "all"
700
867
  }
701
- ]
868
+ ],
869
+ "prefer-promise-reject-errors": "off",
870
+ "require-await": "off"
702
871
  },
703
872
  },
704
873
 
@@ -936,7 +1105,132 @@ export default [
936
1105
  // Markdown/MDX code block linting
937
1106
  {
938
1107
  ...mdxPlugin.flatCodeBlocks,
1108
+ languageOptions: {
1109
+ ...mdxPlugin.flatCodeBlocks.languageOptions,
1110
+ parserOptions: {
1111
+ ...mdxPlugin.flatCodeBlocks.languageOptions?.parserOptions,
1112
+ projectService: false,
1113
+ },
1114
+ },
939
1115
  rules: {
1116
+ ...{
1117
+ "@typescript-eslint/adjacent-overload-signatures": "off",
1118
+ "@typescript-eslint/array-type": "off",
1119
+ "@typescript-eslint/await-thenable": "off",
1120
+ "@typescript-eslint/ban-ts-comment": "off",
1121
+ "@typescript-eslint/ban-tslint-comment": "off",
1122
+ "@typescript-eslint/class-literal-property-style": "off",
1123
+ "@typescript-eslint/consistent-generic-constructors": "off",
1124
+ "@typescript-eslint/consistent-indexed-object-style": "off",
1125
+ "@typescript-eslint/consistent-type-assertions": "off",
1126
+ "@typescript-eslint/consistent-type-definitions": "off",
1127
+ "@typescript-eslint/consistent-type-exports": "off",
1128
+ "@typescript-eslint/consistent-type-imports": "off",
1129
+ "@typescript-eslint/dot-notation": "off",
1130
+ "@typescript-eslint/method-signature-style": "off",
1131
+ "@typescript-eslint/no-array-constructor": "off",
1132
+ "@typescript-eslint/no-array-delete": "off",
1133
+ "@typescript-eslint/no-base-to-string": "off",
1134
+ "@typescript-eslint/no-confusing-non-null-assertion": "off",
1135
+ "@typescript-eslint/no-confusing-void-expression": "off",
1136
+ "@typescript-eslint/no-deprecated": "off",
1137
+ "@typescript-eslint/no-duplicate-enum-values": "off",
1138
+ "@typescript-eslint/no-duplicate-type-constituents": "off",
1139
+ "@typescript-eslint/no-dynamic-delete": "off",
1140
+ "@typescript-eslint/no-empty-function": "off",
1141
+ "@typescript-eslint/no-empty-object-type": "off",
1142
+ "@typescript-eslint/no-explicit-any": "off",
1143
+ "@typescript-eslint/no-extra-non-null-assertion": "off",
1144
+ "@typescript-eslint/no-extraneous-class": "off",
1145
+ "@typescript-eslint/no-floating-promises": "off",
1146
+ "@typescript-eslint/no-for-in-array": "off",
1147
+ "@typescript-eslint/no-implied-eval": "off",
1148
+ "@typescript-eslint/no-import-type-side-effects": "off",
1149
+ "@typescript-eslint/no-inferrable-types": "off",
1150
+ "@typescript-eslint/no-invalid-void-type": "off",
1151
+ "@typescript-eslint/no-meaningless-void-operator": "off",
1152
+ "@typescript-eslint/no-misused-new": "off",
1153
+ "@typescript-eslint/no-misused-promises": "off",
1154
+ "@typescript-eslint/no-misused-spread": "off",
1155
+ "@typescript-eslint/no-mixed-enums": "off",
1156
+ "@typescript-eslint/no-namespace": "off",
1157
+ "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "off",
1158
+ "@typescript-eslint/no-non-null-asserted-optional-chain": "off",
1159
+ "@typescript-eslint/no-non-null-assertion": "off",
1160
+ "@typescript-eslint/no-redundant-type-constituents": "off",
1161
+ "@typescript-eslint/no-require-imports": "off",
1162
+ "@typescript-eslint/no-shadow": "off",
1163
+ "@typescript-eslint/no-this-alias": "off",
1164
+ "@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
1165
+ "@typescript-eslint/no-unnecessary-condition": "off",
1166
+ "@typescript-eslint/no-unnecessary-parameter-property-assignment": "off",
1167
+ "@typescript-eslint/no-unnecessary-qualifier": "off",
1168
+ "@typescript-eslint/no-unnecessary-template-expression": "off",
1169
+ "@typescript-eslint/no-unnecessary-type-arguments": "off",
1170
+ "@typescript-eslint/no-unnecessary-type-assertion": "off",
1171
+ "@typescript-eslint/no-unnecessary-type-constraint": "off",
1172
+ "@typescript-eslint/no-unnecessary-type-conversion": "off",
1173
+ "@typescript-eslint/no-unnecessary-type-parameters": "off",
1174
+ "@typescript-eslint/no-unsafe-argument": "off",
1175
+ "@typescript-eslint/no-unsafe-assignment": "off",
1176
+ "@typescript-eslint/no-unsafe-call": "off",
1177
+ "@typescript-eslint/no-unsafe-declaration-merging": "off",
1178
+ "@typescript-eslint/no-unsafe-enum-comparison": "off",
1179
+ "@typescript-eslint/no-unsafe-function-type": "off",
1180
+ "@typescript-eslint/no-unsafe-member-access": "off",
1181
+ "@typescript-eslint/no-unsafe-return": "off",
1182
+ "@typescript-eslint/no-unsafe-type-assertion": "off",
1183
+ "@typescript-eslint/no-unsafe-unary-minus": "off",
1184
+ "@typescript-eslint/no-unused-expressions": "off",
1185
+ "@typescript-eslint/no-unused-vars": "off",
1186
+ "@typescript-eslint/no-useless-constructor": "off",
1187
+ "@typescript-eslint/no-useless-default-assignment": "off",
1188
+ "@typescript-eslint/no-useless-empty-export": "off",
1189
+ "@typescript-eslint/no-wrapper-object-types": "off",
1190
+ "@typescript-eslint/non-nullable-type-assertion-style": "off",
1191
+ "@typescript-eslint/only-throw-error": "off",
1192
+ "@typescript-eslint/prefer-as-const": "off",
1193
+ "@typescript-eslint/prefer-find": "off",
1194
+ "@typescript-eslint/prefer-for-of": "off",
1195
+ "@typescript-eslint/prefer-function-type": "off",
1196
+ "@typescript-eslint/prefer-includes": "off",
1197
+ "@typescript-eslint/prefer-literal-enum-member": "off",
1198
+ "@typescript-eslint/prefer-namespace-keyword": "off",
1199
+ "@typescript-eslint/prefer-nullish-coalescing": "off",
1200
+ "@typescript-eslint/prefer-optional-chain": "off",
1201
+ "@typescript-eslint/prefer-promise-reject-errors": "off",
1202
+ "@typescript-eslint/prefer-readonly": "off",
1203
+ "@typescript-eslint/prefer-reduce-type-parameter": "off",
1204
+ "@typescript-eslint/prefer-regexp-exec": "off",
1205
+ "@typescript-eslint/prefer-return-this-type": "off",
1206
+ "@typescript-eslint/prefer-string-starts-ends-with": "off",
1207
+ "@typescript-eslint/promise-function-async": "off",
1208
+ "@typescript-eslint/related-getter-setter-pairs": "off",
1209
+ "@typescript-eslint/require-array-sort-compare": "off",
1210
+ "@typescript-eslint/require-await": "off",
1211
+ "@typescript-eslint/restrict-plus-operands": "off",
1212
+ "@typescript-eslint/restrict-template-expressions": "off",
1213
+ "@typescript-eslint/return-await": "off",
1214
+ "@typescript-eslint/strict-boolean-expressions": "off",
1215
+ "@typescript-eslint/strict-void-return": "off",
1216
+ "@typescript-eslint/switch-exhaustiveness-check": "off",
1217
+ "@typescript-eslint/triple-slash-reference": "off",
1218
+ "@typescript-eslint/unbound-method": "off",
1219
+ "@typescript-eslint/unified-signatures": "off",
1220
+ "@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
1221
+ "dot-notation": "off",
1222
+ "no-array-constructor": "off",
1223
+ "no-empty-function": "off",
1224
+ "no-implied-eval": "off",
1225
+ "no-return-await": "off",
1226
+ "no-shadow": "off",
1227
+ "no-throw-literal": "off",
1228
+ "no-useless-constructor": "off",
1229
+ "prefer-promise-reject-errors": "off",
1230
+ "require-await": "off",
1231
+ "strict": "off",
1232
+ "unicode-bom": "off"
1233
+ },
940
1234
  ...mdxPlugin.flatCodeBlocks.rules,
941
1235
  "eol-last": "off",
942
1236
  "no-undef": "off",
package/dist/index.d.ts CHANGED
@@ -1,18 +1,7 @@
1
- import { C as ConfigOptions, F as FlatConfigArray, O as OxlintConfigOptions, a as OxlintConfigResult, R as RuleSeverity, b as RuleOptions } from './types-CAUUIuJR.js';
2
- export { c as RuleScope } from './types-CAUUIuJR.js';
1
+ import { F as FlatConfigArray, R as RuleSeverity, a as RuleOptions, C as ConfigOptions, O as OxlintConfigOptions, b as OxlintConfigResult } from './types-CAO1PbsB.js';
2
+ export { c as RuleScope } from './types-CAO1PbsB.js';
3
3
  import 'eslint';
4
4
 
5
- /**
6
- * Loads a pre-generated ESLint config by dynamically importing the hashed file.
7
- * The hash is computed from the options using the same algorithm as the build.
8
- */
9
- declare function getEslintConfig(opts?: ConfigOptions): Promise<FlatConfigArray>;
10
- /**
11
- * Loads a pre-generated OxLint config from the hashed JSON file.
12
- * Only `react`, `node`, and `ai` flags are relevant — `oxlint` is ignored.
13
- */
14
- declare function getOxlintConfig(opts?: OxlintConfigOptions): OxlintConfigResult;
15
-
16
5
  /**
17
6
  * Change the severity of a rule across all config blocks, preserving options.
18
7
  */
@@ -49,4 +38,15 @@ declare function bitmaskToHash(mask: number): string;
49
38
  /** Convenience: options → filename (without path prefix). */
50
39
  declare function optionsToFilename(opts: ConfigOptions): string;
51
40
 
41
+ /**
42
+ * Loads a pre-generated ESLint config by dynamically importing the hashed file.
43
+ * The hash is computed from the options using the same algorithm as the build.
44
+ */
45
+ declare function getEslintConfig(opts?: ConfigOptions): Promise<FlatConfigArray>;
46
+ /**
47
+ * Loads a pre-generated OxLint config from the hashed JSON file.
48
+ * Only `react`, `node`, and `ai` flags are relevant — `oxlint` is ignored.
49
+ */
50
+ declare function getOxlintConfig(opts?: OxlintConfigOptions): OxlintConfigResult;
51
+
52
52
  export { ConfigOptions, FlatConfigArray, OxlintConfigOptions, OxlintConfigResult, RuleOptions, RuleSeverity, addRule, bitmaskToHash, configureRule, disableAllRulesBut, disableRule, getEslintConfig, getOxlintConfig, optionsToBitmask, optionsToFilename, setRuleSeverity };