@bastidood/eslint-config 0.0.0-stage → 0.1.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.
@@ -0,0 +1,1561 @@
1
+ // ../oxlint/src/core.ts
2
+ /** ESLint core, `import`, `oxc`, and type-aware `typescript` rules. Rules that the TypeScript compiler already reports are off. */
3
+ const CORE = {
4
+ config: {
5
+ plugins: [
6
+ "import",
7
+ "oxc",
8
+ "typescript"
9
+ ],
10
+ jsPlugins: [{
11
+ name: "eslint-js",
12
+ specifier: "oxlint-plugin-eslint"
13
+ }],
14
+ categories: {
15
+ correctness: "error",
16
+ perf: "error",
17
+ suspicious: "error"
18
+ },
19
+ options: {
20
+ denyWarnings: true,
21
+ typeAware: true
22
+ },
23
+ overrides: [{
24
+ files: [
25
+ "**/*.js",
26
+ "**/*.mjs",
27
+ "**/*.cjs"
28
+ ],
29
+ rules: { "no-unused-vars": ["error", {
30
+ argsIgnorePattern: "^_",
31
+ varsIgnorePattern: "^_"
32
+ }] }
33
+ }],
34
+ rules: {
35
+ "accessor-pairs": ["error", { enforceForTSTypes: true }],
36
+ "array-callback-return": ["error", { checkForEach: true }],
37
+ "arrow-body-style": "error",
38
+ "block-scoped-var": "error",
39
+ "capitalized-comments": [
40
+ "error",
41
+ "always",
42
+ { ignoreConsecutiveComments: true }
43
+ ],
44
+ "class-methods-use-this": "error",
45
+ complexity: "off",
46
+ "constructor-super": "off",
47
+ curly: [
48
+ "error",
49
+ "multi-line",
50
+ "consistent"
51
+ ],
52
+ "default-case-last": "error",
53
+ "default-param-last": "error",
54
+ eqeqeq: "error",
55
+ "eslint-js/no-octal-escape": "error",
56
+ "eslint-js/no-undef-init": "error",
57
+ "eslint-js/require-atomic-updates": "error",
58
+ "for-direction": "error",
59
+ "func-name-matching": "off",
60
+ "func-names": ["error", "as-needed"],
61
+ "func-style": ["error", "declaration"],
62
+ "getter-return": "off",
63
+ "grouped-accessor-pairs": ["error", "getBeforeSet"],
64
+ "guard-for-in": "error",
65
+ "id-denylist": "off",
66
+ "id-length": "off",
67
+ "id-match": "off",
68
+ "import/consistent-type-specifier-style": ["error", "prefer-top-level-if-only-type-imports"],
69
+ "import/default": "off",
70
+ "import/exports-last": "off",
71
+ "import/first": "error",
72
+ "import/group-exports": "off",
73
+ "import/max-dependencies": "off",
74
+ "import/namespace": "off",
75
+ "import/newline-after-import": "error",
76
+ "import/no-absolute-path": "error",
77
+ "import/no-amd": "error",
78
+ "import/no-anonymous-default-export": "error",
79
+ "import/no-commonjs": "error",
80
+ "import/no-cycle": "error",
81
+ "import/no-default-export": "off",
82
+ "import/no-dynamic-require": "error",
83
+ "import/no-empty-named-blocks": "error",
84
+ "import/no-mutable-exports": "error",
85
+ "import/no-named-as-default": "error",
86
+ "import/no-named-as-default-member": "error",
87
+ "import/no-named-default": "error",
88
+ "import/no-named-export": "off",
89
+ "import/no-namespace": "off",
90
+ "import/no-nodejs-modules": "off",
91
+ "import/no-self-import": "error",
92
+ "import/no-unassigned-import": "off",
93
+ "import/no-webpack-loader-syntax": "error",
94
+ "import/prefer-default-export": "off",
95
+ "init-declarations": "off",
96
+ "logical-assignment-operators": "error",
97
+ "max-classes-per-file": "off",
98
+ "max-lines": "off",
99
+ "max-lines-per-function": "off",
100
+ "max-nested-callbacks": "off",
101
+ "max-params": "off",
102
+ "max-statements": "off",
103
+ "new-cap": "error",
104
+ "no-alert": "error",
105
+ "no-array-constructor": "error",
106
+ "no-async-promise-executor": "error",
107
+ "no-await-in-loop": "error",
108
+ "no-bitwise": "error",
109
+ "no-caller": "error",
110
+ "no-case-declarations": "error",
111
+ "no-class-assign": "off",
112
+ "no-compare-neg-zero": "error",
113
+ "no-cond-assign": "error",
114
+ "no-console": "error",
115
+ "no-const-assign": "off",
116
+ "no-constant-binary-expression": "error",
117
+ "no-constant-condition": ["error", { checkLoops: "allExceptWhileTrue" }],
118
+ "no-constructor-return": "error",
119
+ "no-continue": "off",
120
+ "no-control-regex": "error",
121
+ "no-debugger": "error",
122
+ "no-delete-var": "off",
123
+ "no-div-regex": "error",
124
+ "no-dupe-class-members": "off",
125
+ "no-dupe-else-if": "error",
126
+ "no-dupe-keys": "off",
127
+ "no-duplicate-case": "error",
128
+ "no-duplicate-imports": "error",
129
+ "no-else-return": "error",
130
+ "no-empty": "error",
131
+ "no-empty-character-class": "error",
132
+ "no-empty-function": "error",
133
+ "no-empty-pattern": "error",
134
+ "no-empty-static-block": "error",
135
+ "no-eq-null": "error",
136
+ "no-eval": "error",
137
+ "no-ex-assign": "error",
138
+ "no-extend-native": "error",
139
+ "no-extra-bind": "error",
140
+ "no-extra-boolean-cast": "error",
141
+ "no-extra-label": "error",
142
+ "no-fallthrough": "error",
143
+ "no-func-assign": "off",
144
+ "no-global-assign": "error",
145
+ "no-implicit-coercion": "error",
146
+ "no-implicit-globals": "error",
147
+ "no-implied-eval": "off",
148
+ "no-import-assign": "off",
149
+ "no-inline-comments": "off",
150
+ "no-inner-declarations": "off",
151
+ "no-invalid-regexp": "error",
152
+ "no-irregular-whitespace": "error",
153
+ "no-iterator": "error",
154
+ "no-label-var": "error",
155
+ "no-labels": "error",
156
+ "no-lone-blocks": "error",
157
+ "no-lonely-if": "error",
158
+ "no-loop-func": "error",
159
+ "no-loss-of-precision": "error",
160
+ "no-magic-numbers": "off",
161
+ "no-misleading-character-class": "error",
162
+ "no-multi-assign": "error",
163
+ "no-multi-str": "error",
164
+ "no-negated-condition": "error",
165
+ "no-nested-ternary": "error",
166
+ "no-new": "error",
167
+ "no-new-func": "error",
168
+ "no-new-native-nonconstructor": "off",
169
+ "no-new-wrappers": "error",
170
+ "no-nonoctal-decimal-escape": "error",
171
+ "no-obj-calls": "off",
172
+ "no-object-constructor": "error",
173
+ "no-param-reassign": "error",
174
+ "no-plusplus": "off",
175
+ "no-promise-executor-return": "error",
176
+ "no-proto": "error",
177
+ "no-prototype-builtins": "error",
178
+ "no-regex-spaces": "error",
179
+ "no-restricted-exports": "off",
180
+ "no-return-assign": "error",
181
+ "no-script-url": "error",
182
+ "no-self-assign": "error",
183
+ "no-self-compare": "error",
184
+ "no-sequences": "error",
185
+ "no-setter-return": "off",
186
+ "no-shadow": "off",
187
+ "no-shadow-restricted-names": "error",
188
+ "no-sparse-arrays": "error",
189
+ "no-template-curly-in-string": "error",
190
+ "no-ternary": "off",
191
+ "no-this-before-super": "off",
192
+ "no-unassigned-vars": "error",
193
+ "no-underscore-dangle": ["error", {
194
+ enforceInMethodNames: true,
195
+ enforceInClassFields: true
196
+ }],
197
+ "no-unexpected-multiline": "error",
198
+ "no-unmodified-loop-condition": "error",
199
+ "no-unneeded-ternary": "error",
200
+ "no-unreachable": "off",
201
+ "no-unreachable-loop": "error",
202
+ "no-unsafe-finally": "error",
203
+ "no-unsafe-negation": "off",
204
+ "no-unsafe-optional-chaining": "off",
205
+ "no-unused-expressions": "error",
206
+ "no-unused-labels": "off",
207
+ "no-unused-private-class-members": "off",
208
+ "no-unused-vars": "off",
209
+ "no-use-before-define": "off",
210
+ "no-useless-assignment": "error",
211
+ "no-useless-backreference": "error",
212
+ "no-useless-call": "error",
213
+ "no-useless-catch": "error",
214
+ "no-useless-computed-key": "error",
215
+ "no-useless-concat": "error",
216
+ "no-useless-constructor": "error",
217
+ "no-useless-escape": "error",
218
+ "no-useless-rename": "error",
219
+ "no-useless-return": "error",
220
+ "no-var": "error",
221
+ "no-void": "off",
222
+ "no-warning-comments": "off",
223
+ "no-with": "off",
224
+ "object-shorthand": [
225
+ "error",
226
+ "always",
227
+ { avoidExplicitReturnArrows: true }
228
+ ],
229
+ "one-var": ["error", "never"],
230
+ "operator-assignment": "error",
231
+ "oxc/approx-constant": "error",
232
+ "oxc/bad-array-method-on-arguments": "error",
233
+ "oxc/bad-bitwise-operator": "error",
234
+ "oxc/bad-char-at-comparison": "error",
235
+ "oxc/bad-comparison-sequence": "error",
236
+ "oxc/bad-match-all-arg": "error",
237
+ "oxc/bad-min-max-func": "error",
238
+ "oxc/bad-object-literal-comparison": "error",
239
+ "oxc/bad-replace-all-arg": "error",
240
+ "oxc/branches-sharing-code": "error",
241
+ "oxc/const-comparisons": "error",
242
+ "oxc/double-comparisons": "error",
243
+ "oxc/erasing-op": "error",
244
+ "oxc/misrefactored-assign-op": "error",
245
+ "oxc/missing-throw": "error",
246
+ "oxc/no-accumulating-spread": "error",
247
+ "oxc/no-async-endpoint-handlers": "off",
248
+ "oxc/no-barrel-file": ["error", { threshold: 0 }],
249
+ "oxc/no-const-enum": "error",
250
+ "oxc/no-map-spread": ["error", {
251
+ ignoreArgs: false,
252
+ ignoreRereads: false
253
+ }],
254
+ "oxc/no-this-in-exported-function": "off",
255
+ "oxc/number-arg-out-of-range": "error",
256
+ "oxc/only-used-in-recursion": "error",
257
+ "oxc/uninvoked-array-callback": "error",
258
+ "prefer-arrow-callback": "error",
259
+ "prefer-const": "error",
260
+ "prefer-destructuring": "error",
261
+ "prefer-exponentiation-operator": "error",
262
+ "prefer-named-capture-group": "error",
263
+ "prefer-numeric-literals": "error",
264
+ "prefer-object-has-own": "error",
265
+ "prefer-object-spread": "error",
266
+ "prefer-regex-literals": "error",
267
+ "prefer-rest-params": "error",
268
+ "prefer-spread": "error",
269
+ "prefer-template": "error",
270
+ "preserve-caught-error": "error",
271
+ radix: "error",
272
+ "require-unicode-regexp": "error",
273
+ "require-yield": "error",
274
+ "sort-keys": "off",
275
+ "symbol-description": "error",
276
+ "typescript/adjacent-overload-signatures": "error",
277
+ "typescript/array-type": "error",
278
+ "typescript/await-thenable": "error",
279
+ "typescript/ban-ts-comment": ["error", { minimumDescriptionLength: 10 }],
280
+ "typescript/ban-tslint-comment": "error",
281
+ "typescript/class-literal-property-style": "error",
282
+ "typescript/consistent-generic-constructors": "error",
283
+ "typescript/consistent-indexed-object-style": "error",
284
+ "typescript/consistent-return": "off",
285
+ "typescript/consistent-type-assertions": "error",
286
+ "typescript/consistent-type-definitions": ["error", "interface"],
287
+ "typescript/dot-notation": "error",
288
+ "typescript/explicit-member-accessibility": ["error", { accessibility: "no-public" }],
289
+ "typescript/init-declarations": "error",
290
+ "typescript/method-signature-style": "error",
291
+ "typescript/no-array-delete": "error",
292
+ "typescript/no-base-to-string": ["error", {
293
+ checkUnknown: true,
294
+ ignoredTypeNames: []
295
+ }],
296
+ "typescript/no-confusing-non-null-assertion": "error",
297
+ "typescript/no-confusing-void-expression": "off",
298
+ "typescript/no-deprecated": "error",
299
+ "typescript/no-duplicate-enum-values": "error",
300
+ "typescript/no-duplicate-type-constituents": "error",
301
+ "typescript/no-dynamic-delete": "error",
302
+ "typescript/no-empty-object-type": "error",
303
+ "typescript/no-explicit-any": "error",
304
+ "typescript/no-extra-non-null-assertion": "error",
305
+ "typescript/no-extraneous-class": "error",
306
+ "typescript/no-floating-promises": ["error", { ignoreVoid: false }],
307
+ "typescript/no-for-in-array": "error",
308
+ "typescript/no-generated-empty-object-type": "error",
309
+ "typescript/no-implied-eval": "error",
310
+ "typescript/no-import-type-side-effects": "error",
311
+ "typescript/no-inferrable-types": "error",
312
+ "typescript/no-invalid-void-type": "error",
313
+ "typescript/no-meaningless-void-operator": "error",
314
+ "typescript/no-misused-new": "error",
315
+ "typescript/no-misused-promises": "error",
316
+ "typescript/no-misused-spread": "error",
317
+ "typescript/no-mixed-enums": "error",
318
+ "typescript/no-namespace": "error",
319
+ "typescript/no-non-null-asserted-nullish-coalescing": "error",
320
+ "typescript/no-non-null-asserted-optional-chain": "error",
321
+ "typescript/no-non-null-assertion": "error",
322
+ "typescript/no-redundant-type-constituents": "error",
323
+ "typescript/no-require-imports": "error",
324
+ "typescript/no-restricted-types": ["error", { types: {
325
+ object: "Use a precise `interface` contract instead of `object`; accept `unknown` only at an untrusted boundary and parse it into a trusted type there.",
326
+ "Record<string, unknown>": "Do not use `Record<string, unknown>`: it is a variant of `any`. Declare a precise `interface`, or accept `unknown` only at an untrusted boundary and parse it into a trusted type there."
327
+ } }],
328
+ "typescript/no-this-alias": "error",
329
+ "typescript/no-unnecessary-boolean-literal-compare": "error",
330
+ "typescript/no-unnecessary-condition": ["error", { allowConstantLoopConditions: true }],
331
+ "typescript/no-unnecessary-parameter-property-assignment": "off",
332
+ "typescript/no-unnecessary-template-expression": "error",
333
+ "typescript/no-unnecessary-type-arguments": "error",
334
+ "typescript/no-unnecessary-type-assertion": "error",
335
+ "typescript/no-unnecessary-type-constraint": "error",
336
+ "typescript/no-unnecessary-type-conversion": "error",
337
+ "typescript/no-unnecessary-type-parameters": "error",
338
+ "typescript/no-unsafe-argument": "error",
339
+ "typescript/no-unsafe-assignment": "error",
340
+ "typescript/no-unsafe-call": "error",
341
+ "typescript/no-unsafe-declaration-merging": "error",
342
+ "typescript/no-unsafe-enum-assignment": "error",
343
+ "typescript/no-unsafe-enum-comparison": "error",
344
+ "typescript/no-unsafe-function-type": "error",
345
+ "typescript/no-unsafe-member-access": "error",
346
+ "typescript/no-unsafe-return": "error",
347
+ "typescript/no-unsafe-type-assertion": "error",
348
+ "typescript/no-unsafe-unary-minus": "error",
349
+ "typescript/no-useless-default-assignment": "error",
350
+ "typescript/no-useless-empty-export": "error",
351
+ "typescript/no-wrapper-object-types": "error",
352
+ "typescript/non-nullable-type-assertion-style": "error",
353
+ "typescript/only-throw-error": "error",
354
+ "typescript/parameter-properties": ["error", { prefer: "class-property" }],
355
+ "typescript/prefer-as-const": "error",
356
+ "typescript/prefer-enum-initializers": "off",
357
+ "typescript/prefer-find": "error",
358
+ "typescript/prefer-for-of": "error",
359
+ "typescript/prefer-function-type": "error",
360
+ "typescript/prefer-includes": "error",
361
+ "typescript/prefer-literal-enum-member": "error",
362
+ "typescript/prefer-namespace-keyword": "error",
363
+ "typescript/prefer-nullish-coalescing": ["error", { ignorePrimitives: { string: true } }],
364
+ "typescript/prefer-optional-chain": "error",
365
+ "typescript/prefer-promise-reject-errors": "error",
366
+ "typescript/prefer-readonly": "error",
367
+ "typescript/prefer-reduce-type-parameter": "error",
368
+ "typescript/prefer-regexp-exec": "error",
369
+ "typescript/prefer-return-this-type": "error",
370
+ "typescript/prefer-string-starts-ends-with": "error",
371
+ "typescript/promise-function-async": "error",
372
+ "typescript/related-getter-setter-pairs": "error",
373
+ "typescript/require-array-sort-compare": "error",
374
+ "typescript/require-await": "error",
375
+ "typescript/restrict-plus-operands": ["error", {
376
+ allowAny: false,
377
+ allowBoolean: false,
378
+ allowNullish: false,
379
+ allowNumberAndString: false,
380
+ allowRegExp: false
381
+ }],
382
+ "typescript/restrict-template-expressions": ["error", {
383
+ allow: [],
384
+ allowAny: false,
385
+ allowBoolean: true,
386
+ allowNever: false,
387
+ allowNullish: false,
388
+ allowNumber: true,
389
+ allowRegExp: false
390
+ }],
391
+ "typescript/return-await": ["error", "always"],
392
+ "typescript/strict-boolean-expressions": ["error", {
393
+ allowNullableObject: false,
394
+ allowNullableNumber: false,
395
+ allowNullableString: false,
396
+ allowNumber: false,
397
+ allowString: false
398
+ }],
399
+ "typescript/strict-void-return": "error",
400
+ "typescript/switch-exhaustiveness-check": ["error", {
401
+ allowDefaultCaseForExhaustiveSwitch: false,
402
+ considerDefaultExhaustiveForUnions: false,
403
+ requireDefaultForNonUnion: true
404
+ }],
405
+ "typescript/triple-slash-reference": "error",
406
+ "typescript/unbound-method": "error",
407
+ "typescript/unified-signatures": "error",
408
+ "typescript/use-unknown-in-catch-callback-variable": "error",
409
+ "unicode-bom": "off",
410
+ "use-isnan": "off",
411
+ "valid-typeof": "off",
412
+ yoda: [
413
+ "error",
414
+ "never",
415
+ { exceptRange: true }
416
+ ]
417
+ }
418
+ },
419
+ restrictions: {
420
+ importPatterns: [{
421
+ regex: String.raw`(^|/)\.\.(?:/|$)`,
422
+ message: "Import through a path alias or package subpath import instead of a parent-relative path (`../`)."
423
+ }],
424
+ globals: [{
425
+ name: "undefined",
426
+ message: "Omit absent values instead of writing `undefined`: conditionally insert the property (as `exactOptionalPropertyTypes` requires) or leave out the argument, and use a `typeof` check to test for absence. Pass `void 0` only to a parameter that cannot be omitted and is explicitly typed to accept `undefined`."
427
+ }],
428
+ properties: [{
429
+ object: "process",
430
+ property: "env",
431
+ message: "Read environment variables only in the entry point: validate them there and pass the values as explicit parameters. Opt the entry point out with a file-level disable comment."
432
+ }],
433
+ syntax: [{
434
+ selector: "[accessibility=\"private\"]:not(MethodDefinition[kind=\"constructor\"])",
435
+ message: "Use an ECMAScript `#private` member instead of the TypeScript `private` modifier."
436
+ }, {
437
+ selector: "UnaryExpression[operator=\"void\"][argument.type=\"Literal\"]:not(:matches(CallExpression, NewExpression) > UnaryExpression.arguments)",
438
+ message: "Do not write `void 0` to produce `undefined`: omit the absent value by conditionally inserting the property (as `exactOptionalPropertyTypes` requires). `void 0` is allowed only as an argument to a parameter that cannot be omitted and is explicitly typed to accept `undefined`."
439
+ }]
440
+ }
441
+ };
442
+ // ../../node_modules/.pnpm/eslint-plugin-oxlint@1.90.0_1f7f827c84bdf07f2069781bf94a9cf1/node_modules/eslint-plugin-oxlint/dist/generated/rules-by-category.mjs
443
+ const pedanticRules = {
444
+ "accessor-pairs": "off",
445
+ "array-callback-return": "off",
446
+ eqeqeq: "off",
447
+ "max-classes-per-file": "off",
448
+ "max-depth": "off",
449
+ "max-lines": "off",
450
+ "max-lines-per-function": "off",
451
+ "max-nested-callbacks": "off",
452
+ "no-array-constructor": "off",
453
+ "no-case-declarations": "off",
454
+ "no-constructor-return": "off",
455
+ "no-else-return": "off",
456
+ "no-fallthrough": "off",
457
+ "no-inline-comments": "off",
458
+ "no-inner-declarations": "off",
459
+ "no-lonely-if": "off",
460
+ "no-loop-func": "off",
461
+ "no-negated-condition": "off",
462
+ "no-new-wrappers": "off",
463
+ "no-object-constructor": "off",
464
+ "no-promise-executor-return": "off",
465
+ "no-prototype-builtins": "off",
466
+ "no-redeclare": "off",
467
+ "no-self-compare": "off",
468
+ "no-throw-literal": "off",
469
+ "no-useless-return": "off",
470
+ "no-warning-comments": "off",
471
+ "prefer-promise-reject-errors": "off",
472
+ radix: "off",
473
+ "require-await": "off",
474
+ "require-unicode-regexp": "off",
475
+ "sort-vars": "off",
476
+ "symbol-description": "off",
477
+ "import/max-dependencies": "off",
478
+ "jest/no-conditional-in-test": "off",
479
+ "jsdoc/require-param": "off",
480
+ "jsdoc/require-param-description": "off",
481
+ "jsdoc/require-param-name": "off",
482
+ "jsdoc/require-param-type": "off",
483
+ "jsdoc/require-returns": "off",
484
+ "jsdoc/require-returns-description": "off",
485
+ "jsdoc/require-returns-type": "off",
486
+ "jsdoc/require-throws-type": "off",
487
+ "jsdoc/require-yields-type": "off",
488
+ "react/checked-requires-onchange-or-readonly": "off",
489
+ "react/display-name": "off",
490
+ "react/jsx-no-target-blank": "off",
491
+ "react/jsx-no-useless-fragment": "off",
492
+ "react/no-unescaped-entities": "off",
493
+ "react-hooks/rules-of-hooks": "off",
494
+ "@typescript-eslint/ban-ts-comment": "off",
495
+ "@typescript-eslint/ban-types": "off",
496
+ "@typescript-eslint/no-unsafe-function-type": "off",
497
+ "@typescript-eslint/prefer-enum-initializers": "off",
498
+ "@typescript-eslint/prefer-ts-expect-error": "off",
499
+ "unicorn/consistent-assert": "off",
500
+ "unicorn/consistent-empty-array-spread": "off",
501
+ "unicorn/escape-case": "off",
502
+ "unicorn/explicit-length-check": "off",
503
+ "unicorn/new-for-builtins": "off",
504
+ "unicorn/no-array-callback-reference": "off",
505
+ "unicorn/no-hex-escape": "off",
506
+ "unicorn/no-immediate-mutation": "off",
507
+ "unicorn/no-instanceof-array": "off",
508
+ "unicorn/no-lonely-if": "off",
509
+ "unicorn/no-negated-condition": "off",
510
+ "unicorn/no-negation-in-equality-check": "off",
511
+ "unicorn/no-new-buffer": "off",
512
+ "unicorn/no-object-as-default-parameter": "off",
513
+ "unicorn/no-static-only-class": "off",
514
+ "unicorn/no-this-assignment": "off",
515
+ "unicorn/no-typeof-undefined": "off",
516
+ "unicorn/no-unnecessary-array-flat-depth": "off",
517
+ "unicorn/no-unnecessary-array-splice-count": "off",
518
+ "unicorn/no-unnecessary-slice-end": "off",
519
+ "unicorn/no-unreadable-iife": "off",
520
+ "unicorn/no-useless-promise-resolve-reject": "off",
521
+ "unicorn/no-useless-switch-case": "off",
522
+ "unicorn/no-useless-undefined": "off",
523
+ "unicorn/prefer-array-flat": "off",
524
+ "unicorn/prefer-array-some": "off",
525
+ "unicorn/prefer-at": "off",
526
+ "unicorn/prefer-blob-reading-methods": "off",
527
+ "unicorn/prefer-code-point": "off",
528
+ "unicorn/prefer-date-now": "off",
529
+ "unicorn/prefer-dom-node-append": "off",
530
+ "unicorn/prefer-dom-node-dataset": "off",
531
+ "unicorn/prefer-dom-node-remove": "off",
532
+ "unicorn/prefer-event-target": "off",
533
+ "unicorn/prefer-import-meta-properties": "off",
534
+ "unicorn/prefer-math-min-max": "off",
535
+ "unicorn/prefer-math-trunc": "off",
536
+ "unicorn/prefer-native-coercion-functions": "off",
537
+ "unicorn/prefer-number-coercion": "off",
538
+ "unicorn/prefer-prototype-methods": "off",
539
+ "unicorn/prefer-query-selector": "off",
540
+ "unicorn/prefer-regexp-test": "off",
541
+ "unicorn/prefer-single-call": "off",
542
+ "unicorn/prefer-string-replace-all": "off",
543
+ "unicorn/prefer-string-slice": "off",
544
+ "unicorn/prefer-top-level-await": "off",
545
+ "unicorn/prefer-type-error": "off",
546
+ "unicorn/require-number-to-fixed-digits-argument": "off",
547
+ "vitest/no-conditional-in-test": "off",
548
+ "@typescript-eslint/no-array-constructor": "off",
549
+ "@typescript-eslint/no-loop-func": "off",
550
+ "@typescript-eslint/no-redeclare": "off",
551
+ "import-x/max-dependencies": "off"
552
+ };
553
+ const styleRules = {
554
+ "arrow-body-style": "off",
555
+ "capitalized-comments": "off",
556
+ curly: "off",
557
+ "default-case-last": "off",
558
+ "default-param-last": "off",
559
+ "func-name-matching": "off",
560
+ "func-names": "off",
561
+ "func-style": "off",
562
+ "grouped-accessor-pairs": "off",
563
+ "guard-for-in": "off",
564
+ "id-denylist": "off",
565
+ "id-length": "off",
566
+ "id-match": "off",
567
+ "init-declarations": "off",
568
+ "logical-assignment-operators": "off",
569
+ "max-params": "off",
570
+ "max-statements": "off",
571
+ "new-cap": "off",
572
+ "no-continue": "off",
573
+ "no-duplicate-imports": "off",
574
+ "no-extra-label": "off",
575
+ "no-implicit-coercion": "off",
576
+ "no-label-var": "off",
577
+ "no-labels": "off",
578
+ "no-lone-blocks": "off",
579
+ "no-magic-numbers": "off",
580
+ "no-multi-assign": "off",
581
+ "no-multi-str": "off",
582
+ "no-nested-ternary": "off",
583
+ "no-new-func": "off",
584
+ "no-return-assign": "off",
585
+ "no-script-url": "off",
586
+ "no-template-curly-in-string": "off",
587
+ "no-ternary": "off",
588
+ "no-useless-computed-key": "off",
589
+ "object-shorthand": "off",
590
+ "one-var": "off",
591
+ "operator-assignment": "off",
592
+ "prefer-arrow-callback": "off",
593
+ "prefer-const": "off",
594
+ "prefer-destructuring": "off",
595
+ "prefer-exponentiation-operator": "off",
596
+ "prefer-named-capture-group": "off",
597
+ "prefer-numeric-literals": "off",
598
+ "prefer-object-has-own": "off",
599
+ "prefer-object-spread": "off",
600
+ "prefer-regex-literals": "off",
601
+ "prefer-rest-params": "off",
602
+ "prefer-spread": "off",
603
+ "prefer-template": "off",
604
+ "sort-imports": "off",
605
+ "sort-keys": "off",
606
+ "vars-on-top": "off",
607
+ yoda: "off",
608
+ "import/consistent-type-specifier-style": "off",
609
+ "import/exports-last": "off",
610
+ "import/first": "off",
611
+ "import/group-exports": "off",
612
+ "import/newline-after-import": "off",
613
+ "import/no-anonymous-default-export": "off",
614
+ "import/no-duplicates": "off",
615
+ "import/no-mutable-exports": "off",
616
+ "import/no-named-default": "off",
617
+ "import/no-named-export": "off",
618
+ "import/no-namespace": "off",
619
+ "import/no-nodejs-modules": "off",
620
+ "import/prefer-default-export": "off",
621
+ "jest/consistent-test-it": "off",
622
+ "jest/max-expects": "off",
623
+ "jest/max-nested-describe": "off",
624
+ "jest/no-alias-methods": "off",
625
+ "jest/no-confusing-set-timeout": "off",
626
+ "jest/no-deprecated-functions": "off",
627
+ "jest/no-done-callback": "off",
628
+ "jest/no-duplicate-hooks": "off",
629
+ "jest/no-hooks": "off",
630
+ "jest/no-identical-title": "off",
631
+ "jest/no-interpolation-in-snapshots": "off",
632
+ "jest/no-jasmine-globals": "off",
633
+ "jest/no-large-snapshots": "off",
634
+ "jest/no-mocks-import": "off",
635
+ "jest/no-restricted-jest-methods": "off",
636
+ "jest/no-restricted-matchers": "off",
637
+ "jest/no-test-prefixes": "off",
638
+ "jest/no-test-return-statement": "off",
639
+ "jest/no-unneeded-async-expect-function": "off",
640
+ "jest/no-untyped-mock-factory": "off",
641
+ "jest/padding-around-after-all-blocks": "off",
642
+ "jest/padding-around-test-blocks": "off",
643
+ "jest/prefer-called-with": "off",
644
+ "jest/prefer-comparison-matcher": "off",
645
+ "jest/prefer-each": "off",
646
+ "jest/prefer-ending-with-an-expect": "off",
647
+ "jest/prefer-equality-matcher": "off",
648
+ "jest/prefer-expect-assertions": "off",
649
+ "jest/prefer-expect-resolves": "off",
650
+ "jest/prefer-hooks-in-order": "off",
651
+ "jest/prefer-hooks-on-top": "off",
652
+ "jest/prefer-importing-jest-globals": "off",
653
+ "jest/prefer-jest-mocked": "off",
654
+ "jest/prefer-lowercase-title": "off",
655
+ "jest/prefer-mock-promise-shorthand": "off",
656
+ "jest/prefer-mock-return-shorthand": "off",
657
+ "jest/prefer-spy-on": "off",
658
+ "jest/prefer-strict-equal": "off",
659
+ "jest/prefer-to-be": "off",
660
+ "jest/prefer-to-contain": "off",
661
+ "jest/prefer-to-have-been-called": "off",
662
+ "jest/prefer-to-have-been-called-times": "off",
663
+ "jest/prefer-to-have-length": "off",
664
+ "jest/prefer-todo": "off",
665
+ "jest/require-hook": "off",
666
+ "jest/require-top-level-describe": "off",
667
+ "jsdoc/no-blank-blocks": "off",
668
+ "jsdoc/require-throws-description": "off",
669
+ "jsdoc/require-yields-description": "off",
670
+ "n/callback-return": "off",
671
+ "n/exports-style": "off",
672
+ "n/global-require": "off",
673
+ "n/no-mixed-requires": "off",
674
+ "n/no-sync": "off",
675
+ "promise/avoid-new": "off",
676
+ "promise/no-nesting": "off",
677
+ "promise/no-return-wrap": "off",
678
+ "promise/param-names": "off",
679
+ "promise/prefer-await-to-callbacks": "off",
680
+ "promise/prefer-await-to-then": "off",
681
+ "promise/prefer-catch": "off",
682
+ "react/function-component-definition": "off",
683
+ "react/hook-use-state": "off",
684
+ "react/jsx-boolean-value": "off",
685
+ "react/jsx-curly-brace-presence": "off",
686
+ "react/jsx-fragments": "off",
687
+ "react/jsx-handler-names": "off",
688
+ "react/jsx-max-depth": "off",
689
+ "react/jsx-pascal-case": "off",
690
+ "react/jsx-props-no-spreading": "off",
691
+ "react/no-redundant-should-component-update": "off",
692
+ "react/no-set-state": "off",
693
+ "react/prefer-es6-class": "off",
694
+ "react/self-closing-comp": "off",
695
+ "react/state-in-constructor": "off",
696
+ "@typescript-eslint/adjacent-overload-signatures": "off",
697
+ "@typescript-eslint/array-type": "off",
698
+ "@typescript-eslint/ban-tslint-comment": "off",
699
+ "@typescript-eslint/class-literal-property-style": "off",
700
+ "@typescript-eslint/consistent-generic-constructors": "off",
701
+ "@typescript-eslint/consistent-indexed-object-style": "off",
702
+ "@typescript-eslint/consistent-type-assertions": "off",
703
+ "@typescript-eslint/consistent-type-definitions": "off",
704
+ "@typescript-eslint/consistent-type-imports": "off",
705
+ "@typescript-eslint/method-signature-style": "off",
706
+ "@typescript-eslint/no-empty-interface": "off",
707
+ "@typescript-eslint/no-inferrable-types": "off",
708
+ "@typescript-eslint/parameter-properties": "off",
709
+ "@typescript-eslint/prefer-for-of": "off",
710
+ "@typescript-eslint/prefer-function-type": "off",
711
+ "@typescript-eslint/unified-signatures": "off",
712
+ "unicorn/catch-error-name": "off",
713
+ "unicorn/consistent-date-clone": "off",
714
+ "unicorn/consistent-existence-index-check": "off",
715
+ "unicorn/consistent-template-literal-escape": "off",
716
+ "unicorn/custom-error-definition": "off",
717
+ "unicorn/empty-brace-spaces": "off",
718
+ "unicorn/error-message": "off",
719
+ "unicorn/explicit-timer-delay": "off",
720
+ "unicorn/filename-case": "off",
721
+ "unicorn/max-nested-calls": "off",
722
+ "unicorn/no-array-method-this-argument": "off",
723
+ "unicorn/no-await-expression-member": "off",
724
+ "unicorn/no-console-spaces": "off",
725
+ "unicorn/no-nested-ternary": "off",
726
+ "unicorn/no-null": "off",
727
+ "unicorn/no-unreadable-array-destructuring": "off",
728
+ "unicorn/no-useless-collection-argument": "off",
729
+ "unicorn/no-zero-fractions": "off",
730
+ "unicorn/number-literal-case": "off",
731
+ "unicorn/numeric-separators-style": "off",
732
+ "unicorn/prefer-array-index-of": "off",
733
+ "unicorn/prefer-bigint-literals": "off",
734
+ "unicorn/prefer-class-fields": "off",
735
+ "unicorn/prefer-classlist-toggle": "off",
736
+ "unicorn/prefer-default-parameters": "off",
737
+ "unicorn/prefer-dom-node-text-content": "off",
738
+ "unicorn/prefer-export-from": "off",
739
+ "unicorn/prefer-global-this": "off",
740
+ "unicorn/prefer-includes": "off",
741
+ "unicorn/prefer-keyboard-event-key": "off",
742
+ "unicorn/prefer-logical-operator-over-ternary": "off",
743
+ "unicorn/prefer-modern-dom-apis": "off",
744
+ "unicorn/prefer-negative-index": "off",
745
+ "unicorn/prefer-object-from-entries": "off",
746
+ "unicorn/prefer-optional-catch-binding": "off",
747
+ "unicorn/prefer-reflect-apply": "off",
748
+ "unicorn/prefer-response-static-json": "off",
749
+ "unicorn/prefer-spread": "off",
750
+ "unicorn/prefer-string-raw": "off",
751
+ "unicorn/prefer-string-trim-start-end": "off",
752
+ "unicorn/prefer-structured-clone": "off",
753
+ "unicorn/prefer-ternary": "off",
754
+ "unicorn/relative-url-style": "off",
755
+ "unicorn/require-array-join-separator": "off",
756
+ "unicorn/require-module-attributes": "off",
757
+ "unicorn/switch-case-braces": "off",
758
+ "unicorn/switch-case-break-position": "off",
759
+ "unicorn/text-encoding-identifier-case": "off",
760
+ "unicorn/throw-new-error": "off",
761
+ "vitest/consistent-each-for": "off",
762
+ "vitest/consistent-test-filename": "off",
763
+ "vitest/consistent-test-it": "off",
764
+ "vitest/consistent-vitest-vi": "off",
765
+ "vitest/max-expects": "off",
766
+ "vitest/max-nested-describe": "off",
767
+ "vitest/no-alias-methods": "off",
768
+ "vitest/no-duplicate-hooks": "off",
769
+ "vitest/no-hooks": "off",
770
+ "vitest/no-identical-title": "off",
771
+ "vitest/no-import-node-test": "off",
772
+ "vitest/no-importing-vitest-globals": "off",
773
+ "vitest/no-interpolation-in-snapshots": "off",
774
+ "vitest/no-large-snapshots": "off",
775
+ "vitest/no-mocks-import": "off",
776
+ "vitest/no-restricted-matchers": "off",
777
+ "vitest/no-restricted-vi-methods": "off",
778
+ "vitest/no-test-prefixes": "off",
779
+ "vitest/no-test-return-statement": "off",
780
+ "vitest/no-unneeded-async-expect-function": "off",
781
+ "vitest/padding-around-after-all-blocks": "off",
782
+ "vitest/padding-around-test-blocks": "off",
783
+ "vitest/prefer-called-exactly-once-with": "off",
784
+ "vitest/prefer-called-once": "off",
785
+ "vitest/prefer-called-times": "off",
786
+ "vitest/prefer-called-with": "off",
787
+ "vitest/prefer-comparison-matcher": "off",
788
+ "vitest/prefer-describe-function-title": "off",
789
+ "vitest/prefer-each": "off",
790
+ "vitest/prefer-equality-matcher": "off",
791
+ "vitest/prefer-expect-assertions": "off",
792
+ "vitest/prefer-expect-resolves": "off",
793
+ "vitest/prefer-expect-type-of": "off",
794
+ "vitest/prefer-hooks-in-order": "off",
795
+ "vitest/prefer-hooks-on-top": "off",
796
+ "vitest/prefer-import-in-mock": "off",
797
+ "vitest/prefer-importing-vitest-globals": "off",
798
+ "vitest/prefer-lowercase-title": "off",
799
+ "vitest/prefer-mock-promise-shorthand": "off",
800
+ "vitest/prefer-mock-return-shorthand": "off",
801
+ "vitest/prefer-spy-on": "off",
802
+ "vitest/prefer-strict-boolean-matchers": "off",
803
+ "vitest/prefer-strict-equal": "off",
804
+ "vitest/prefer-to-be": "off",
805
+ "vitest/prefer-to-be-falsy": "off",
806
+ "vitest/prefer-to-be-object": "off",
807
+ "vitest/prefer-to-be-truthy": "off",
808
+ "vitest/prefer-to-contain": "off",
809
+ "vitest/prefer-to-have-been-called-times": "off",
810
+ "vitest/prefer-to-have-length": "off",
811
+ "vitest/prefer-todo": "off",
812
+ "vitest/require-hook": "off",
813
+ "vitest/require-top-level-describe": "off",
814
+ "vue/component-definition-name-casing": "off",
815
+ "vue/define-emits-declaration": "off",
816
+ "vue/define-props-declaration": "off",
817
+ "vue/define-props-destructuring": "off",
818
+ "vue/next-tick-style": "off",
819
+ "vue/prop-name-casing": "off",
820
+ "vue/require-default-prop": "off",
821
+ "vue/require-direct-export": "off",
822
+ "vue/require-prop-types": "off",
823
+ "vue/require-typed-ref": "off",
824
+ "@typescript-eslint/default-param-last": "off",
825
+ "@typescript-eslint/init-declarations": "off",
826
+ "@typescript-eslint/max-params": "off",
827
+ "@typescript-eslint/no-magic-numbers": "off",
828
+ "import-x/consistent-type-specifier-style": "off",
829
+ "import-x/exports-last": "off",
830
+ "import-x/first": "off",
831
+ "import-x/group-exports": "off",
832
+ "import-x/newline-after-import": "off",
833
+ "import-x/no-anonymous-default-export": "off",
834
+ "import-x/no-duplicates": "off",
835
+ "import-x/no-mutable-exports": "off",
836
+ "import-x/no-named-default": "off",
837
+ "import-x/no-named-export": "off",
838
+ "import-x/no-namespace": "off",
839
+ "import-x/no-nodejs-modules": "off",
840
+ "import-x/prefer-default-export": "off"
841
+ };
842
+ const suspiciousRules = {
843
+ "block-scoped-var": "off",
844
+ "no-extend-native": "off",
845
+ "no-extra-bind": "off",
846
+ "no-implied-eval": "off",
847
+ "no-new": "off",
848
+ "no-shadow": "off",
849
+ "no-underscore-dangle": "off",
850
+ "no-unexpected-multiline": "off",
851
+ "no-unmodified-loop-condition": "off",
852
+ "no-unneeded-ternary": "off",
853
+ "no-useless-concat": "off",
854
+ "no-useless-constructor": "off",
855
+ "preserve-caught-error": "off",
856
+ "import/no-absolute-path": "off",
857
+ "import/no-empty-named-blocks": "off",
858
+ "import/no-named-as-default": "off",
859
+ "import/no-named-as-default-member": "off",
860
+ "import/no-self-import": "off",
861
+ "import/no-unassigned-import": "off",
862
+ "jest/no-commented-out-tests": "off",
863
+ "n/no-exports-assign": "off",
864
+ "promise/always-return": "off",
865
+ "promise/no-multiple-resolved": "off",
866
+ "promise/no-promise-in-callback": "off",
867
+ "react-hooks/capitalized-calls": "off",
868
+ "react-hooks/exhaustive-effect-dependencies": "off",
869
+ "react-hooks/hooks": "off",
870
+ "react/iframe-missing-sandbox": "off",
871
+ "react/jsx-no-comment-textnodes": "off",
872
+ "react/jsx-no-script-url": "off",
873
+ "react-hooks/memo-dependencies": "off",
874
+ "react/no-namespace": "off",
875
+ "react/no-unstable-nested-components": "off",
876
+ "react/react-in-jsx-scope": "off",
877
+ "react/style-prop-object": "off",
878
+ "@typescript-eslint/no-confusing-non-null-assertion": "off",
879
+ "@typescript-eslint/no-extraneous-class": "off",
880
+ "@typescript-eslint/no-unnecessary-type-constraint": "off",
881
+ "unicorn/consistent-function-scoping": "off",
882
+ "unicorn/no-accessor-recursion": "off",
883
+ "unicorn/no-array-fill-with-reference-type": "off",
884
+ "unicorn/no-array-reverse": "off",
885
+ "unicorn/no-array-sort": "off",
886
+ "unicorn/no-confusing-array-with": "off",
887
+ "unicorn/no-instanceof-builtins": "off",
888
+ "unicorn/prefer-add-event-listener": "off",
889
+ "unicorn/require-module-specifiers": "off",
890
+ "unicorn/require-post-message-target-origin": "off",
891
+ "vitest/no-commented-out-tests": "off",
892
+ "vue/no-required-prop-with-default": "off",
893
+ "vue/require-default-export": "off",
894
+ "@typescript-eslint/no-shadow": "off",
895
+ "@typescript-eslint/no-useless-constructor": "off",
896
+ "import-x/no-absolute-path": "off",
897
+ "import-x/no-empty-named-blocks": "off",
898
+ "import-x/no-named-as-default": "off",
899
+ "import-x/no-named-as-default-member": "off",
900
+ "import-x/no-self-import": "off",
901
+ "import-x/no-unassigned-import": "off"
902
+ };
903
+ const restrictionRules = {
904
+ "class-methods-use-this": "off",
905
+ complexity: "off",
906
+ "default-case": "off",
907
+ "no-alert": "off",
908
+ "no-bitwise": "off",
909
+ "no-console": "off",
910
+ "no-div-regex": "off",
911
+ "no-empty": "off",
912
+ "no-empty-function": "off",
913
+ "no-eq-null": "off",
914
+ "no-implicit-globals": "off",
915
+ "no-param-reassign": "off",
916
+ "no-plusplus": "off",
917
+ "no-proto": "off",
918
+ "no-regex-spaces": "off",
919
+ "no-restricted-globals": "off",
920
+ "no-restricted-imports": "off",
921
+ "no-restricted-properties": "off",
922
+ "no-sequences": "off",
923
+ "no-undefined": "off",
924
+ "no-use-before-define": "off",
925
+ "no-var": "off",
926
+ "no-void": "off",
927
+ "unicode-bom": "off",
928
+ "import/extensions": "off",
929
+ "import/no-amd": "off",
930
+ "import/no-commonjs": "off",
931
+ "import/no-cycle": "off",
932
+ "import/no-default-export": "off",
933
+ "import/no-dynamic-require": "off",
934
+ "import/no-relative-parent-imports": "off",
935
+ "import/no-webpack-loader-syntax": "off",
936
+ "import/unambiguous": "off",
937
+ "jsdoc/check-access": "off",
938
+ "jsdoc/empty-tags": "off",
939
+ "jsx-a11y/anchor-ambiguous-text": "off",
940
+ "n/handle-callback-err": "off",
941
+ "n/no-new-require": "off",
942
+ "n/no-path-concat": "off",
943
+ "n/no-process-env": "off",
944
+ "n/no-top-level-await": "off",
945
+ "promise/catch-or-return": "off",
946
+ "promise/spec-only": "off",
947
+ "react/button-has-type": "off",
948
+ "react/forbid-component-props": "off",
949
+ "react/forbid-dom-props": "off",
950
+ "react/forbid-elements": "off",
951
+ "react-hooks/invariant": "off",
952
+ "react/jsx-filename-extension": "off",
953
+ "react/jsx-no-literals": "off",
954
+ "react/no-clone-element": "off",
955
+ "react/no-danger": "off",
956
+ "react/no-multi-comp": "off",
957
+ "react/no-react-children": "off",
958
+ "react/no-unknown-property": "off",
959
+ "react/only-export-components": "off",
960
+ "react/prefer-function-component": "off",
961
+ "react-hooks/rule-suppression": "off",
962
+ "react-hooks/syntax": "off",
963
+ "react-hooks/todo": "off",
964
+ "react-hooks/unsupported-syntax": "off",
965
+ "@typescript-eslint/explicit-function-return-type": "off",
966
+ "@typescript-eslint/explicit-member-accessibility": "off",
967
+ "@typescript-eslint/explicit-module-boundary-types": "off",
968
+ "@typescript-eslint/no-dynamic-delete": "off",
969
+ "@typescript-eslint/no-empty-object-type": "off",
970
+ "@typescript-eslint/no-explicit-any": "off",
971
+ "@typescript-eslint/no-import-type-side-effects": "off",
972
+ "@typescript-eslint/no-invalid-void-type": "off",
973
+ "@typescript-eslint/no-namespace": "off",
974
+ "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "off",
975
+ "@typescript-eslint/no-non-null-assertion": "off",
976
+ "@typescript-eslint/no-require-imports": "off",
977
+ "@typescript-eslint/no-restricted-types": "off",
978
+ "@typescript-eslint/no-var-requires": "off",
979
+ "@typescript-eslint/prefer-literal-enum-member": "off",
980
+ "unicorn/import-style": "off",
981
+ "unicorn/no-abusive-eslint-disable": "off",
982
+ "unicorn/no-anonymous-default-export": "off",
983
+ "unicorn/no-array-for-each": "off",
984
+ "unicorn/no-array-reduce": "off",
985
+ "unicorn/no-document-cookie": "off",
986
+ "unicorn/no-length-as-slice-end": "off",
987
+ "unicorn/no-magic-array-flat-depth": "off",
988
+ "unicorn/no-process-exit": "off",
989
+ "unicorn/no-useless-error-capture-stack-trace": "off",
990
+ "unicorn/prefer-modern-math-apis": "off",
991
+ "unicorn/prefer-module": "off",
992
+ "unicorn/prefer-node-protocol": "off",
993
+ "unicorn/prefer-number-properties": "off",
994
+ "vitest/require-test-timeout": "off",
995
+ "vue/max-props": "off",
996
+ "vue/no-import-compiler-macros": "off",
997
+ "vue/no-multiple-slot-args": "off",
998
+ "@typescript-eslint/class-methods-use-this": "off",
999
+ "@typescript-eslint/no-empty-function": "off",
1000
+ "@typescript-eslint/no-restricted-imports": "off",
1001
+ "@typescript-eslint/no-use-before-define": "off",
1002
+ "import-x/extensions": "off",
1003
+ "import-x/no-amd": "off",
1004
+ "import-x/no-commonjs": "off",
1005
+ "import-x/no-cycle": "off",
1006
+ "import-x/no-default-export": "off",
1007
+ "import-x/no-dynamic-require": "off",
1008
+ "import-x/no-relative-parent-imports": "off",
1009
+ "import-x/no-webpack-loader-syntax": "off",
1010
+ "import-x/unambiguous": "off",
1011
+ "react-refresh/only-export-components": "off"
1012
+ };
1013
+ const correctnessRules = {
1014
+ "constructor-super": "off",
1015
+ "for-direction": "off",
1016
+ "getter-return": "off",
1017
+ "no-async-promise-executor": "off",
1018
+ "no-caller": "off",
1019
+ "no-class-assign": "off",
1020
+ "no-compare-neg-zero": "off",
1021
+ "no-cond-assign": "off",
1022
+ "no-const-assign": "off",
1023
+ "no-constant-binary-expression": "off",
1024
+ "no-constant-condition": "off",
1025
+ "no-control-regex": "off",
1026
+ "no-debugger": "off",
1027
+ "no-delete-var": "off",
1028
+ "no-dupe-class-members": "off",
1029
+ "no-dupe-else-if": "off",
1030
+ "no-dupe-keys": "off",
1031
+ "no-duplicate-case": "off",
1032
+ "no-empty-character-class": "off",
1033
+ "no-empty-pattern": "off",
1034
+ "no-empty-static-block": "off",
1035
+ "no-eval": "off",
1036
+ "no-ex-assign": "off",
1037
+ "no-extra-boolean-cast": "off",
1038
+ "no-func-assign": "off",
1039
+ "no-global-assign": "off",
1040
+ "no-import-assign": "off",
1041
+ "no-invalid-regexp": "off",
1042
+ "no-irregular-whitespace": "off",
1043
+ "no-iterator": "off",
1044
+ "no-loss-of-precision": "off",
1045
+ "no-misleading-character-class": "off",
1046
+ "no-new-native-nonconstructor": "off",
1047
+ "no-nonoctal-decimal-escape": "off",
1048
+ "no-obj-calls": "off",
1049
+ "no-self-assign": "off",
1050
+ "no-setter-return": "off",
1051
+ "no-shadow-restricted-names": "off",
1052
+ "no-sparse-arrays": "off",
1053
+ "no-this-before-super": "off",
1054
+ "no-unassigned-vars": "off",
1055
+ "no-unreachable": "off",
1056
+ "no-unsafe-finally": "off",
1057
+ "no-unsafe-negation": "off",
1058
+ "no-unsafe-optional-chaining": "off",
1059
+ "no-unused-expressions": "off",
1060
+ "no-unused-labels": "off",
1061
+ "no-unused-private-class-members": "off",
1062
+ "no-unused-vars": "off",
1063
+ "no-useless-backreference": "off",
1064
+ "no-useless-catch": "off",
1065
+ "no-useless-escape": "off",
1066
+ "no-useless-rename": "off",
1067
+ "no-with": "off",
1068
+ "require-yield": "off",
1069
+ "use-isnan": "off",
1070
+ "valid-typeof": "off",
1071
+ "import/default": "off",
1072
+ "import/namespace": "off",
1073
+ "jest/expect-expect": "off",
1074
+ "jest/no-conditional-expect": "off",
1075
+ "jest/no-disabled-tests": "off",
1076
+ "jest/no-export": "off",
1077
+ "jest/no-focused-tests": "off",
1078
+ "jest/no-standalone-expect": "off",
1079
+ "jest/prefer-snapshot-hint": "off",
1080
+ "jest/require-to-throw-message": "off",
1081
+ "jest/valid-describe-callback": "off",
1082
+ "jest/valid-expect": "off",
1083
+ "jest/valid-expect-in-promise": "off",
1084
+ "jest/valid-title": "off",
1085
+ "jsdoc/check-property-names": "off",
1086
+ "jsdoc/check-tag-names": "off",
1087
+ "jsdoc/implements-on-classes": "off",
1088
+ "jsdoc/no-defaults": "off",
1089
+ "jsdoc/require-property": "off",
1090
+ "jsdoc/require-property-description": "off",
1091
+ "jsdoc/require-property-name": "off",
1092
+ "jsdoc/require-property-type": "off",
1093
+ "jsdoc/require-yields": "off",
1094
+ "jsx-a11y/alt-text": "off",
1095
+ "jsx-a11y/anchor-has-content": "off",
1096
+ "jsx-a11y/anchor-is-valid": "off",
1097
+ "jsx-a11y/aria-activedescendant-has-tabindex": "off",
1098
+ "jsx-a11y/aria-props": "off",
1099
+ "jsx-a11y/aria-proptypes": "off",
1100
+ "jsx-a11y/aria-role": "off",
1101
+ "jsx-a11y/aria-unsupported-elements": "off",
1102
+ "jsx-a11y/autocomplete-valid": "off",
1103
+ "jsx-a11y/click-events-have-key-events": "off",
1104
+ "jsx-a11y/control-has-associated-label": "off",
1105
+ "jsx-a11y/heading-has-content": "off",
1106
+ "jsx-a11y/html-has-lang": "off",
1107
+ "jsx-a11y/iframe-has-title": "off",
1108
+ "jsx-a11y/img-redundant-alt": "off",
1109
+ "jsx-a11y/interactive-supports-focus": "off",
1110
+ "jsx-a11y/label-has-associated-control": "off",
1111
+ "jsx-a11y/lang": "off",
1112
+ "jsx-a11y/media-has-caption": "off",
1113
+ "jsx-a11y/mouse-events-have-key-events": "off",
1114
+ "jsx-a11y/no-access-key": "off",
1115
+ "jsx-a11y/no-aria-hidden-on-focusable": "off",
1116
+ "jsx-a11y/no-autofocus": "off",
1117
+ "jsx-a11y/no-distracting-elements": "off",
1118
+ "jsx-a11y/no-interactive-element-to-noninteractive-role": "off",
1119
+ "jsx-a11y/no-noninteractive-element-interactions": "off",
1120
+ "jsx-a11y/no-noninteractive-element-to-interactive-role": "off",
1121
+ "jsx-a11y/no-noninteractive-tabindex": "off",
1122
+ "jsx-a11y/no-redundant-roles": "off",
1123
+ "jsx-a11y/no-static-element-interactions": "off",
1124
+ "jsx-a11y/prefer-tag-over-role": "off",
1125
+ "jsx-a11y/role-has-required-aria-props": "off",
1126
+ "jsx-a11y/role-supports-aria-props": "off",
1127
+ "jsx-a11y/scope": "off",
1128
+ "jsx-a11y/tabindex-no-positive": "off",
1129
+ "@next/next/google-font-display": "off",
1130
+ "@next/next/google-font-preconnect": "off",
1131
+ "@next/next/inline-script-id": "off",
1132
+ "@next/next/next-script-for-ga": "off",
1133
+ "@next/next/no-assign-module-variable": "off",
1134
+ "@next/next/no-async-client-component": "off",
1135
+ "@next/next/no-before-interactive-script-outside-document": "off",
1136
+ "@next/next/no-css-tags": "off",
1137
+ "@next/next/no-document-import-in-page": "off",
1138
+ "@next/next/no-duplicate-head": "off",
1139
+ "@next/next/no-head-element": "off",
1140
+ "@next/next/no-head-import-in-document": "off",
1141
+ "@next/next/no-html-link-for-pages": "off",
1142
+ "@next/next/no-img-element": "off",
1143
+ "@next/next/no-page-custom-font": "off",
1144
+ "@next/next/no-script-component-in-head": "off",
1145
+ "@next/next/no-styled-jsx-in-document": "off",
1146
+ "@next/next/no-sync-scripts": "off",
1147
+ "@next/next/no-title-in-document-head": "off",
1148
+ "@next/next/no-typos": "off",
1149
+ "@next/next/no-unwanted-polyfillio": "off",
1150
+ "promise/no-callback-in-promise": "off",
1151
+ "promise/no-new-statics": "off",
1152
+ "promise/valid-params": "off",
1153
+ "react-hooks/error-boundaries": "off",
1154
+ "react-hooks/exhaustive-deps": "off",
1155
+ "react/forward-ref-uses-ref": "off",
1156
+ "react-hooks/globals": "off",
1157
+ "react-hooks/immutability": "off",
1158
+ "react-hooks/incompatible-library": "off",
1159
+ "react/jsx-key": "off",
1160
+ "react/jsx-no-duplicate-props": "off",
1161
+ "react/jsx-no-undef": "off",
1162
+ "react/jsx-props-no-spread-multi": "off",
1163
+ "react/no-children-prop": "off",
1164
+ "react/no-danger-with-children": "off",
1165
+ "react/no-did-mount-set-state": "off",
1166
+ "react/no-did-update-set-state": "off",
1167
+ "react/no-direct-mutation-state": "off",
1168
+ "react/no-find-dom-node": "off",
1169
+ "react/no-is-mounted": "off",
1170
+ "react/no-render-return-value": "off",
1171
+ "react/no-string-refs": "off",
1172
+ "react/no-this-in-sfc": "off",
1173
+ "react/no-unsafe": "off",
1174
+ "react/no-will-update-set-state": "off",
1175
+ "react-hooks/preserve-manual-memoization": "off",
1176
+ "react-hooks/purity": "off",
1177
+ "react-hooks/refs": "off",
1178
+ "react-hooks/set-state-in-effect": "off",
1179
+ "react-hooks/set-state-in-render": "off",
1180
+ "react-hooks/static-components": "off",
1181
+ "react-hooks/use-memo": "off",
1182
+ "react/void-dom-elements-no-children": "off",
1183
+ "react-hooks/void-use-memo": "off",
1184
+ "@typescript-eslint/no-duplicate-enum-values": "off",
1185
+ "@typescript-eslint/no-extra-non-null-assertion": "off",
1186
+ "@typescript-eslint/no-misused-new": "off",
1187
+ "@typescript-eslint/no-non-null-asserted-optional-chain": "off",
1188
+ "@typescript-eslint/no-this-alias": "off",
1189
+ "@typescript-eslint/no-unnecessary-parameter-property-assignment": "off",
1190
+ "@typescript-eslint/no-unsafe-declaration-merging": "off",
1191
+ "@typescript-eslint/no-useless-empty-export": "off",
1192
+ "@typescript-eslint/no-wrapper-object-types": "off",
1193
+ "@typescript-eslint/prefer-as-const": "off",
1194
+ "@typescript-eslint/prefer-namespace-keyword": "off",
1195
+ "@typescript-eslint/triple-slash-reference": "off",
1196
+ "unicorn/no-await-in-promise-methods": "off",
1197
+ "unicorn/no-empty-file": "off",
1198
+ "unicorn/no-invalid-fetch-options": "off",
1199
+ "unicorn/no-invalid-remove-event-listener": "off",
1200
+ "unicorn/no-new-array": "off",
1201
+ "unicorn/no-single-promise-in-promise-methods": "off",
1202
+ "unicorn/no-thenable": "off",
1203
+ "unicorn/no-unnecessary-await": "off",
1204
+ "unicorn/no-useless-fallback-in-spread": "off",
1205
+ "unicorn/no-useless-length-check": "off",
1206
+ "unicorn/no-useless-spread": "off",
1207
+ "unicorn/prefer-set-size": "off",
1208
+ "unicorn/prefer-string-starts-ends-with": "off",
1209
+ "vitest/expect-expect": "off",
1210
+ "vitest/hoisted-apis-on-top": "off",
1211
+ "vitest/no-conditional-expect": "off",
1212
+ "vitest/no-conditional-tests": "off",
1213
+ "vitest/no-disabled-tests": "off",
1214
+ "vitest/no-focused-tests": "off",
1215
+ "vitest/no-standalone-expect": "off",
1216
+ "vitest/prefer-snapshot-hint": "off",
1217
+ "vitest/require-awaited-expect-poll": "off",
1218
+ "vitest/require-local-test-context-for-concurrent-snapshots": "off",
1219
+ "vitest/require-mock-type-parameters": "off",
1220
+ "vitest/require-to-throw-message": "off",
1221
+ "vitest/valid-describe-callback": "off",
1222
+ "vitest/valid-expect": "off",
1223
+ "vitest/valid-expect-in-promise": "off",
1224
+ "vitest/valid-title": "off",
1225
+ "vitest/warn-todo": "off",
1226
+ "vue/no-arrow-functions-in-watch": "off",
1227
+ "vue/no-async-in-computed-properties": "off",
1228
+ "vue/no-computed-properties-in-data": "off",
1229
+ "vue/no-deprecated-data-object-declaration": "off",
1230
+ "vue/no-deprecated-delete-set": "off",
1231
+ "vue/no-deprecated-destroyed-lifecycle": "off",
1232
+ "vue/no-deprecated-events-api": "off",
1233
+ "vue/no-deprecated-model-definition": "off",
1234
+ "vue/no-deprecated-props-default-this": "off",
1235
+ "vue/no-deprecated-vue-config-keycodes": "off",
1236
+ "vue/no-dupe-keys": "off",
1237
+ "vue/no-export-in-script-setup": "off",
1238
+ "vue/no-expose-after-await": "off",
1239
+ "vue/no-lifecycle-after-await": "off",
1240
+ "vue/no-reserved-component-names": "off",
1241
+ "vue/no-reserved-keys": "off",
1242
+ "vue/no-reserved-props": "off",
1243
+ "vue/no-shared-component-data": "off",
1244
+ "vue/no-side-effects-in-computed-properties": "off",
1245
+ "vue/no-this-in-before-route-enter": "off",
1246
+ "vue/no-watch-after-await": "off",
1247
+ "vue/prefer-import-from-vue": "off",
1248
+ "vue/require-prop-type-constructor": "off",
1249
+ "vue/require-render-return": "off",
1250
+ "vue/require-slots-as-functions": "off",
1251
+ "vue/return-in-computed-property": "off",
1252
+ "vue/return-in-emits-validator": "off",
1253
+ "vue/valid-define-emits": "off",
1254
+ "vue/valid-define-options": "off",
1255
+ "vue/valid-define-props": "off",
1256
+ "vue/valid-next-tick": "off",
1257
+ "@typescript-eslint/no-dupe-class-members": "off",
1258
+ "@typescript-eslint/no-loss-of-precision": "off",
1259
+ "@typescript-eslint/no-unused-expressions": "off",
1260
+ "@typescript-eslint/no-unused-vars": "off",
1261
+ "import-x/default": "off",
1262
+ "import-x/namespace": "off"
1263
+ };
1264
+ const perfRules = {
1265
+ "no-await-in-loop": "off",
1266
+ "no-useless-call": "off",
1267
+ "react/jsx-no-constructed-context-values": "off",
1268
+ "react/no-array-index-key": "off",
1269
+ "react-hooks/no-deriving-state-in-effects": "off",
1270
+ "react/no-object-type-as-default-prop": "off",
1271
+ "react-perf/jsx-no-jsx-as-prop": "off",
1272
+ "react-perf/jsx-no-new-array-as-prop": "off",
1273
+ "react-perf/jsx-no-new-function-as-prop": "off",
1274
+ "react-perf/jsx-no-new-object-as-prop": "off",
1275
+ "unicorn/prefer-array-find": "off",
1276
+ "unicorn/prefer-array-flat-map": "off",
1277
+ "unicorn/prefer-set-has": "off"
1278
+ };
1279
+ const nurseryRules = {
1280
+ "no-restricted-exports": "off",
1281
+ "no-undef": "off",
1282
+ "no-unreachable-loop": "off",
1283
+ "no-useless-assignment": "off",
1284
+ "import/export": "off",
1285
+ "import/named": "off",
1286
+ "promise/no-return-in-finally": "off",
1287
+ "react/require-render-return": "off",
1288
+ "unicorn/no-useless-iterator-to-array": "off",
1289
+ "import-x/export": "off",
1290
+ "import-x/named": "off"
1291
+ };
1292
+ const correctnessTypeAwareRules = {
1293
+ "@typescript-eslint/await-thenable": "off",
1294
+ "@typescript-eslint/no-array-delete": "off",
1295
+ "@typescript-eslint/no-base-to-string": "off",
1296
+ "@typescript-eslint/no-duplicate-type-constituents": "off",
1297
+ "@typescript-eslint/no-floating-promises": "off",
1298
+ "@typescript-eslint/no-for-in-array": "off",
1299
+ "@typescript-eslint/no-implied-eval": "off",
1300
+ "@typescript-eslint/no-meaningless-void-operator": "off",
1301
+ "@typescript-eslint/no-misused-spread": "off",
1302
+ "@typescript-eslint/no-redundant-type-constituents": "off",
1303
+ "@typescript-eslint/no-unsafe-unary-minus": "off",
1304
+ "@typescript-eslint/no-useless-default-assignment": "off",
1305
+ "@typescript-eslint/require-array-sort-compare": "off",
1306
+ "@typescript-eslint/restrict-template-expressions": "off",
1307
+ "@typescript-eslint/unbound-method": "off"
1308
+ };
1309
+ const suspiciousTypeAwareRules = {
1310
+ "@typescript-eslint/consistent-return": "off",
1311
+ "@typescript-eslint/no-generated-empty-object-type": "off",
1312
+ "@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
1313
+ "@typescript-eslint/no-unnecessary-template-expression": "off",
1314
+ "@typescript-eslint/no-unnecessary-type-arguments": "off",
1315
+ "@typescript-eslint/no-unnecessary-type-assertion": "off",
1316
+ "@typescript-eslint/no-unnecessary-type-conversion": "off",
1317
+ "@typescript-eslint/no-unnecessary-type-parameters": "off",
1318
+ "@typescript-eslint/no-unsafe-enum-assignment": "off",
1319
+ "@typescript-eslint/no-unsafe-enum-comparison": "off",
1320
+ "@typescript-eslint/no-unsafe-type-assertion": "off"
1321
+ };
1322
+ const styleTypeAwareRules = {
1323
+ "@typescript-eslint/consistent-type-exports": "off",
1324
+ "@typescript-eslint/dot-notation": "off",
1325
+ "@typescript-eslint/no-unnecessary-qualifier": "off",
1326
+ "@typescript-eslint/prefer-find": "off",
1327
+ "@typescript-eslint/prefer-readonly": "off",
1328
+ "@typescript-eslint/prefer-reduce-type-parameter": "off",
1329
+ "@typescript-eslint/prefer-regexp-exec": "off",
1330
+ "@typescript-eslint/prefer-return-this-type": "off",
1331
+ "@typescript-eslint/prefer-string-starts-ends-with": "off"
1332
+ };
1333
+ const pedanticTypeAwareRules = {
1334
+ "@typescript-eslint/no-confusing-void-expression": "off",
1335
+ "@typescript-eslint/no-deprecated": "off",
1336
+ "@typescript-eslint/no-misused-promises": "off",
1337
+ "@typescript-eslint/no-mixed-enums": "off",
1338
+ "@typescript-eslint/no-unsafe-argument": "off",
1339
+ "@typescript-eslint/no-unsafe-assignment": "off",
1340
+ "@typescript-eslint/no-unsafe-call": "off",
1341
+ "@typescript-eslint/no-unsafe-member-access": "off",
1342
+ "@typescript-eslint/no-unsafe-return": "off",
1343
+ "@typescript-eslint/only-throw-error": "off",
1344
+ "@typescript-eslint/prefer-includes": "off",
1345
+ "@typescript-eslint/prefer-nullish-coalescing": "off",
1346
+ "@typescript-eslint/prefer-promise-reject-errors": "off",
1347
+ "@typescript-eslint/prefer-readonly-parameter-types": "off",
1348
+ "@typescript-eslint/related-getter-setter-pairs": "off",
1349
+ "@typescript-eslint/require-await": "off",
1350
+ "@typescript-eslint/restrict-plus-operands": "off",
1351
+ "@typescript-eslint/return-await": "off",
1352
+ "@typescript-eslint/strict-boolean-expressions": "off",
1353
+ "@typescript-eslint/strict-void-return": "off",
1354
+ "@typescript-eslint/switch-exhaustiveness-check": "off"
1355
+ };
1356
+ const nurseryTypeAwareRules = {
1357
+ "@typescript-eslint/no-unnecessary-condition": "off",
1358
+ "@typescript-eslint/prefer-optional-chain": "off"
1359
+ };
1360
+ const restrictionTypeAwareRules = {
1361
+ "@typescript-eslint/non-nullable-type-assertion-style": "off",
1362
+ "@typescript-eslint/promise-function-async": "off",
1363
+ "@typescript-eslint/use-unknown-in-catch-callback-variable": "off"
1364
+ };
1365
+ // ../../node_modules/.pnpm/eslint-plugin-oxlint@1.90.0_1f7f827c84bdf07f2069781bf94a9cf1/node_modules/eslint-plugin-oxlint/dist/generated/rules-by-scope.mjs
1366
+ const reactHooksRules = {
1367
+ "react-hooks/capitalized-calls": "off",
1368
+ "react-hooks/error-boundaries": "off",
1369
+ "react-hooks/exhaustive-deps": "off",
1370
+ "react-hooks/exhaustive-effect-dependencies": "off",
1371
+ "react-hooks/globals": "off",
1372
+ "react-hooks/hooks": "off",
1373
+ "react-hooks/immutability": "off",
1374
+ "react-hooks/incompatible-library": "off",
1375
+ "react-hooks/invariant": "off",
1376
+ "react-hooks/memo-dependencies": "off",
1377
+ "react-hooks/no-deriving-state-in-effects": "off",
1378
+ "react-hooks/preserve-manual-memoization": "off",
1379
+ "react-hooks/purity": "off",
1380
+ "react-hooks/refs": "off",
1381
+ "react-hooks/rule-suppression": "off",
1382
+ "react-hooks/rules-of-hooks": "off",
1383
+ "react-hooks/set-state-in-effect": "off",
1384
+ "react-hooks/set-state-in-render": "off",
1385
+ "react-hooks/static-components": "off",
1386
+ "react-hooks/syntax": "off",
1387
+ "react-hooks/todo": "off",
1388
+ "react-hooks/unsupported-syntax": "off",
1389
+ "react-hooks/use-memo": "off",
1390
+ "react-hooks/void-use-memo": "off"
1391
+ };
1392
+ // src/convert/index.ts
1393
+ var UnsupportedSeverityError = class extends Error {
1394
+ constructor(severity) {
1395
+ super(`Oxlint severity ${severity} has no ESLint equivalent.`);
1396
+ this.name = "UnsupportedSeverityError";
1397
+ }
1398
+ };
1399
+ const ESLINT = ["eslint"];
1400
+ const IMPORT = ["import"];
1401
+ const JSDOC = ["jsdoc"];
1402
+ const JSX_A11Y = ["jsx-a11y"];
1403
+ const NODE = ["n"];
1404
+ const PROMISE = ["promise"];
1405
+ const REACT = ["react", "react-hooks"];
1406
+ const REACT_PERF = ["react-perf"];
1407
+ const TYPESCRIPT = ["@typescript-eslint"];
1408
+ const UNICORN = ["unicorn"];
1409
+ const VITEST = ["vitest"];
1410
+ /** ESLint rule namespaces that an Oxlint plugin covers. */
1411
+ function namespacesOf(plugin) {
1412
+ switch (plugin) {
1413
+ case "eslint": return ESLINT;
1414
+ case "import": return IMPORT;
1415
+ case "jsdoc": return JSDOC;
1416
+ case "jsx-a11y": return JSX_A11Y;
1417
+ case "node": return NODE;
1418
+ case "promise": return PROMISE;
1419
+ case "react": return REACT;
1420
+ case "react-perf": return REACT_PERF;
1421
+ case "typescript": return TYPESCRIPT;
1422
+ case "unicorn": return UNICORN;
1423
+ case "vitest": return VITEST;
1424
+ default: return null;
1425
+ }
1426
+ }
1427
+ /**
1428
+ * Whether ESLint can run a rule, given its ESLint name. The conversion prunes unsupported rules: Oxlint-only rules,
1429
+ * and rules or options that the ESLint 10 plugins lack.
1430
+ */
1431
+ function isSupportedInEslint(eslintName) {
1432
+ switch (eslintName) {
1433
+ case "import/consistent-type-specifier-style": return false;
1434
+ default: return !eslintName.startsWith("oxc/");
1435
+ }
1436
+ }
1437
+ /** Rename the rules that an ESLint 10 plugin publishes under a different name than Oxlint's `eslint-plugin-oxlint` lists. */
1438
+ function renamedInEslint(eslintName) {
1439
+ switch (eslintName) {
1440
+ case "unicorn/no-array-for-each": return "unicorn/no-for-each";
1441
+ default: return eslintName;
1442
+ }
1443
+ }
1444
+ function namespaceOf(eslintName) {
1445
+ const separator = eslintName.lastIndexOf("/");
1446
+ return separator === -1 ? "eslint" : eslintName.slice(0, separator);
1447
+ }
1448
+ /** Index the published category lists once: category, then ESLint namespace, then rule names. */
1449
+ function indexCategories() {
1450
+ const sources = [
1451
+ ["correctness", [correctnessRules, correctnessTypeAwareRules]],
1452
+ ["nursery", [nurseryRules, nurseryTypeAwareRules]],
1453
+ ["pedantic", [pedanticRules, pedanticTypeAwareRules]],
1454
+ ["perf", [perfRules]],
1455
+ ["restriction", [restrictionRules, restrictionTypeAwareRules]],
1456
+ ["style", [styleRules, styleTypeAwareRules]],
1457
+ ["suspicious", [suspiciousRules, suspiciousTypeAwareRules]]
1458
+ ];
1459
+ const index = /* @__PURE__ */ new Map();
1460
+ for (const [category, ruleSets] of sources) {
1461
+ const byNamespace = /* @__PURE__ */ new Map();
1462
+ for (const ruleSet of ruleSets) for (const name in ruleSet) {
1463
+ if (!Object.hasOwn(ruleSet, name) || !isSupportedInEslint(name)) continue;
1464
+ const namespace = namespaceOf(name);
1465
+ const eslintName = renamedInEslint(name);
1466
+ const names = byNamespace.get(namespace);
1467
+ if (typeof names === "undefined") byNamespace.set(namespace, [eslintName]);
1468
+ else names.push(eslintName);
1469
+ }
1470
+ index.set(category, byNamespace);
1471
+ }
1472
+ return index;
1473
+ }
1474
+ const CATEGORY_INDEX = indexCategories();
1475
+ /** Translate an Oxlint rule name into the name of the same rule in ESLint and its plugins. */
1476
+ function toEslintRuleName(name) {
1477
+ const separator = name.indexOf("/");
1478
+ if (separator === -1) return name;
1479
+ const rule = name.slice(separator + 1);
1480
+ switch (name.slice(0, separator)) {
1481
+ case "eslint-js": return rule;
1482
+ case "typescript": return `@typescript-eslint/${rule}`;
1483
+ case "node": return `n/${rule}`;
1484
+ case "unicorn": return renamedInEslint(name);
1485
+ case "react": {
1486
+ const hook = `react-hooks/${rule}`;
1487
+ return Object.hasOwn(reactHooksRules, hook) ? hook : name;
1488
+ }
1489
+ default: return name;
1490
+ }
1491
+ }
1492
+ function toEslintSeverity(severity) {
1493
+ switch (severity) {
1494
+ case "deny":
1495
+ case "error": return "error";
1496
+ case "allow":
1497
+ case "off": return "off";
1498
+ case "warn": return "warn";
1499
+ default: switch (severity) {
1500
+ case 0:
1501
+ case 1:
1502
+ case 2: return severity;
1503
+ default: throw new UnsupportedSeverityError(severity);
1504
+ }
1505
+ }
1506
+ }
1507
+ function toEslintRuleEntry(rule) {
1508
+ return Array.isArray(rule) ? [toEslintSeverity(rule[0]), ...rule.values().drop(1)] : toEslintSeverity(rule);
1509
+ }
1510
+ /** Write the ESLint equivalents of explicitly configured Oxlint rules, skipping rules that ESLint cannot run. */
1511
+ function writeEslintRules(target, rules) {
1512
+ for (const name in rules) {
1513
+ if (!Object.hasOwn(rules, name)) continue;
1514
+ const rule = rules[name];
1515
+ if (typeof rule === "undefined") continue;
1516
+ const eslintName = toEslintRuleName(name);
1517
+ if (isSupportedInEslint(eslintName)) target[eslintName] = toEslintRuleEntry(rule);
1518
+ }
1519
+ }
1520
+ /**
1521
+ * Hand each configured ESLint core rule to the typescript-eslint extension of the same name, which understands
1522
+ * TypeScript syntax and types. An explicit Oxlint `typescript/*` rule configures its extension directly, and a
1523
+ * deprecated extension leaves the core rule in charge.
1524
+ */
1525
+ function writeExtensionRules(target, rules, extensions) {
1526
+ if (typeof extensions === "undefined") return;
1527
+ for (const name in extensions) {
1528
+ if (!Object.hasOwn(extensions, name)) continue;
1529
+ const entry = target[name];
1530
+ if (typeof entry === "undefined") continue;
1531
+ const extension = `@typescript-eslint/${name}`;
1532
+ const deprecated = extensions[name]?.meta?.deprecated;
1533
+ if (typeof deprecated !== "undefined" && deprecated !== false) {
1534
+ if (Object.hasOwn(target, extension)) target[extension] = "off";
1535
+ } else if (Object.hasOwn(rules, `typescript/${name}`)) target[name] = "off";
1536
+ else {
1537
+ target[extension] = entry;
1538
+ target[name] = "off";
1539
+ }
1540
+ }
1541
+ }
1542
+ /** Write the ESLint rules that the configured Oxlint categories enable for the given Oxlint plugins. */
1543
+ function writeCategoryRules(target, categories, plugins) {
1544
+ for (const [category, byNamespace] of CATEGORY_INDEX) {
1545
+ const severity = categories[category];
1546
+ if (typeof severity === "undefined") continue;
1547
+ writeNamespaceRules(target, byNamespace, plugins, toEslintSeverity(severity));
1548
+ }
1549
+ }
1550
+ function writeNamespaceRules(target, byNamespace, plugins, severity) {
1551
+ for (const plugin of plugins) {
1552
+ const namespaces = namespacesOf(plugin);
1553
+ if (namespaces === null) continue;
1554
+ for (const namespace of namespaces) {
1555
+ const names = byNamespace.get(namespace);
1556
+ if (typeof names === "undefined") continue;
1557
+ for (const name of names) target[name] = severity;
1558
+ }
1559
+ }
1560
+ }
1561
+ export { CORE as i, writeEslintRules as n, writeExtensionRules as r, writeCategoryRules as t };