@oxlint/migrate 1.61.0 → 1.64.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.
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as nurseryRules, i as buildUnsupportedRuleExplanations, n as preFixForJsPlugins, o as rules_exports, r as isOffValue, s as normalizeRuleToCanonical, t as main } from "../src-C6PykABn.mjs";
2
+ import { a as nurseryRules, i as buildUnsupportedRuleExplanations, n as preFixForJsPlugins, o as rules_exports, r as isOffValue, s as normalizeRuleToCanonical, t as main } from "../src-DH3JQTaC.mjs";
3
3
  import { program } from "commander";
4
4
  import { existsSync, readFileSync, renameSync, writeFileSync } from "node:fs";
5
5
  import path from "node:path";
@@ -30,7 +30,7 @@ const loadESLintConfig = async (filePath) => {
30
30
  };
31
31
  //#endregion
32
32
  //#region package.json
33
- var version = "1.61.0";
33
+ var version = "1.64.0";
34
34
  //#endregion
35
35
  //#region src/walker/comments/replaceRuleDirectiveComment.ts
36
36
  const allRulesSet = new Set(Object.values(rules_exports).flat());
@@ -1,4 +1,4 @@
1
- //#region node_modules/.pnpm/oxlint@1.61.0_oxlint-tsgolint@0.19.0/node_modules/oxlint/dist/index.d.ts
1
+ //#region node_modules/.pnpm/oxlint@1.64.0_oxlint-tsgolint@0.22.1/node_modules/oxlint/dist/index.d.ts
2
2
  //#region src-js/package/config.generated.d.ts
3
3
  type AllowWarnDeny = ("allow" | "off" | "warn" | "error" | "deny") | number;
4
4
  type GlobalValue = "readonly" | "writable" | "off";
@@ -33,12 +33,14 @@ type ExternalPluginEntry = string | {
33
33
  };
34
34
  /**
35
35
  * A set of glob patterns.
36
+ * Patterns are matched against paths relative to the configuration file's directory.
36
37
  */
37
38
  type GlobSet = string[];
38
39
  type LintPluginOptionsSchema = "eslint" | "react" | "unicorn" | "typescript" | "oxc" | "import" | "jsdoc" | "jest" | "vitest" | "jsx-a11y" | "nextjs" | "react-perf" | "promise" | "node" | "vue";
39
40
  type LintPlugins = LintPluginOptionsSchema[];
40
41
  type DummyRule = AllowWarnDeny | [AllowWarnDeny, ...unknown[]];
41
42
  type OxlintOverrides = OxlintOverride[];
43
+ type JestVersionSchema = number | string;
42
44
  type TagNamePreference = string | {
43
45
  message: string;
44
46
  replacement: string;
@@ -197,6 +199,26 @@ interface Oxlintrc$1 {
197
199
  * }
198
200
  * ```
199
201
  *
202
+ * Basic usage with a TypeScript plugin and a local plugin path.
203
+ *
204
+ * TypeScript plugin files are supported in the following environments:
205
+ * - Deno and Bun: TypeScript files are supported natively.
206
+ * - Node.js >=22.18.0 and Node.js ^20.19.0: TypeScript files are supported natively with built-in
207
+ * type-stripping enabled by default.
208
+ *
209
+ * For older Node.js versions, TypeScript plugins are not supported. Please use JavaScript plugins or upgrade your Node version.
210
+ *
211
+ * ```json
212
+ * {
213
+ * "jsPlugins": [
214
+ * "./custom-plugin.ts"
215
+ * ],
216
+ * "rules": {
217
+ * "custom/rule-name": "warn"
218
+ * }
219
+ * }
220
+ * ```
221
+ *
200
222
  * Using a built-in Rust plugin alongside a JS plugin with the same name
201
223
  * by giving the JS plugin an alias.
202
224
  *
@@ -299,8 +321,50 @@ interface RuleCategories {
299
321
  * Predefine global variables.
300
322
  *
301
323
  * Environments specify what global variables are predefined.
302
- * See [ESLint's list of environments](https://eslint.org/docs/v8.x/use/configure/language-options#specifying-environments)
303
- * for what environments are available and what each one provides.
324
+ * Available environments:
325
+ * - amd - require() and define() globals.
326
+ * - applescript - AppleScript globals.
327
+ * - astro - Astro globals.
328
+ * - atomtest - Atom test globals.
329
+ * - audioworklet - AudioWorklet globals.
330
+ * - browser - browser globals.
331
+ * - builtin - Latest ECMAScript globals, equivalent to es2026.
332
+ * - commonjs - CommonJS globals and scoping.
333
+ * - embertest - Ember test globals.
334
+ * - es2015 - ECMAScript 2015 globals.
335
+ * - es2016 - ECMAScript 2016 globals.
336
+ * - es2017 - ECMAScript 2017 globals.
337
+ * - es2018 - ECMAScript 2018 globals.
338
+ * - es2019 - ECMAScript 2019 globals.
339
+ * - es2020 - ECMAScript 2020 globals.
340
+ * - es2021 - ECMAScript 2021 globals.
341
+ * - es2022 - ECMAScript 2022 globals.
342
+ * - es2023 - ECMAScript 2023 globals.
343
+ * - es2024 - ECMAScript 2024 globals.
344
+ * - es2025 - ECMAScript 2025 globals.
345
+ * - es2026 - ECMAScript 2026 globals.
346
+ * - es6 - ECMAScript 6 globals except modules.
347
+ * - greasemonkey - GreaseMonkey globals.
348
+ * - jasmine - Jasmine globals.
349
+ * - jest - Jest globals.
350
+ * - jquery - jQuery globals.
351
+ * - meteor - Meteor globals.
352
+ * - mocha - Mocha globals.
353
+ * - mongo - MongoDB globals.
354
+ * - nashorn - Java 8 Nashorn globals.
355
+ * - node - Node.js globals and scoping.
356
+ * - phantomjs - PhantomJS globals.
357
+ * - prototypejs - Prototype.js globals.
358
+ * - protractor - Protractor globals.
359
+ * - qunit - QUnit globals.
360
+ * - serviceworker - Service Worker globals.
361
+ * - shared-node-browser - Node.js and Browser common globals.
362
+ * - shelljs - ShellJS globals.
363
+ * - svelte - Svelte globals.
364
+ * - vitest - Vitest globals.
365
+ * - vue - Vue globals.
366
+ * - webextensions - WebExtensions globals.
367
+ * - worker - Web Workers globals.
304
368
  */
305
369
  interface OxlintEnv {
306
370
  [k: string]: boolean;
@@ -357,6 +421,14 @@ interface OxlintOptions {
357
421
  * Only supported in the root configuration file.
358
422
  */
359
423
  reportUnusedDisableDirectives?: AllowWarnDeny;
424
+ /**
425
+ * Whether oxlint should respect `eslint-disable*` and `eslint-enable*`
426
+ * directives in addition to its native `oxlint-*` directives.
427
+ *
428
+ * Defaults to `true`.
429
+ * Only supported in the root configuration file.
430
+ */
431
+ respectEslintDisableDirectives?: boolean;
360
432
  /**
361
433
  * Enable rules that require type information.
362
434
  *
@@ -442,6 +514,7 @@ interface DummyRuleMap {
442
514
  * ```
443
515
  */
444
516
  interface OxlintPluginSettings {
517
+ jest?: JestPluginSettings;
445
518
  jsdoc?: JSDocPluginSettings;
446
519
  "jsx-a11y"?: JSXA11YPluginSettings;
447
520
  next?: NextPluginSettings;
@@ -449,6 +522,23 @@ interface OxlintPluginSettings {
449
522
  vitest?: VitestPluginSettings;
450
523
  [k: string]: unknown;
451
524
  }
525
+ /**
526
+ * Configure Jest plugin rules.
527
+ *
528
+ * See [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest)'s
529
+ * configuration for a full reference.
530
+ */
531
+ interface JestPluginSettings {
532
+ /**
533
+ * Jest version — accepts a number (`29`) or a semver string (`"29.1.0"` or `"v29.1.0"`),
534
+ * storing only the major version.
535
+ * ::: warning
536
+ * Using this config will override the `no-deprecated-functions` config set.
537
+ * :::
538
+ */
539
+ version?: JestVersionSchema;
540
+ [k: string]: unknown;
541
+ }
452
542
  interface JSDocPluginSettings {
453
543
  /**
454
544
  * Only for `require-(yields|returns|description|example|param|throws)` rule
@@ -1,2 +1,2 @@
1
- import { t as main } from "../src-C6PykABn.mjs";
1
+ import { t as main } from "../src-DH3JQTaC.mjs";
2
2
  export { main as default };
@@ -431,6 +431,7 @@ const pedanticRules = [
431
431
  "no-warning-comments",
432
432
  "radix",
433
433
  "require-await",
434
+ "require-unicode-regexp",
434
435
  "sort-vars",
435
436
  "symbol-description",
436
437
  "import/max-dependencies",
@@ -484,6 +485,7 @@ const pedanticRules = [
484
485
  "unicorn/no-immediate-mutation",
485
486
  "unicorn/no-instanceof-array",
486
487
  "unicorn/no-lonely-if",
488
+ "unicorn/no-negated-condition",
487
489
  "unicorn/no-negation-in-equality-check",
488
490
  "unicorn/no-new-buffer",
489
491
  "unicorn/no-object-as-default-parameter",
@@ -519,11 +521,10 @@ const pedanticRules = [
519
521
  "unicorn/prefer-top-level-await",
520
522
  "unicorn/prefer-type-error",
521
523
  "unicorn/require-number-to-fixed-digits-argument",
524
+ "vitest/no-conditional-in-test",
522
525
  "typescript/no-array-constructor",
523
526
  "typescript/no-loop-func",
524
- "unicorn/no-negated-condition",
525
- "typescript/no-redeclare",
526
- "vitest/no-conditional-in-test"
527
+ "typescript/no-redeclare"
527
528
  ];
528
529
  const styleRules = [
529
530
  "arrow-body-style",
@@ -531,12 +532,14 @@ const styleRules = [
531
532
  "curly",
532
533
  "default-case-last",
533
534
  "default-param-last",
535
+ "func-name-matching",
534
536
  "func-names",
535
537
  "func-style",
536
538
  "grouped-accessor-pairs",
537
539
  "guard-for-in",
538
540
  "id-length",
539
541
  "init-declarations",
542
+ "logical-assignment-operators",
540
543
  "max-params",
541
544
  "max-statements",
542
545
  "new-cap",
@@ -566,6 +569,7 @@ const styleRules = [
566
569
  "prefer-object-has-own",
567
570
  "prefer-object-spread",
568
571
  "prefer-promise-reject-errors",
572
+ "prefer-regex-literals",
569
573
  "prefer-rest-params",
570
574
  "prefer-spread",
571
575
  "prefer-template",
@@ -612,6 +616,7 @@ const styleRules = [
612
616
  "jest/prefer-each",
613
617
  "jest/prefer-ending-with-an-expect",
614
618
  "jest/prefer-equality-matcher",
619
+ "jest/prefer-expect-assertions",
615
620
  "jest/prefer-expect-resolves",
616
621
  "jest/prefer-hooks-in-order",
617
622
  "jest/prefer-hooks-on-top",
@@ -723,62 +728,63 @@ const styleRules = [
723
728
  "unicorn/text-encoding-identifier-case",
724
729
  "unicorn/throw-new-error",
725
730
  "vitest/consistent-test-filename",
726
- "vitest/consistent-vitest-vi",
727
- "vitest/no-import-node-test",
728
- "vitest/no-importing-vitest-globals",
729
- "vitest/prefer-called-exactly-once-with",
730
- "vitest/prefer-called-once",
731
- "vitest/prefer-called-times",
732
- "vitest/prefer-describe-function-title",
733
- "vitest/prefer-expect-type-of",
734
- "vitest/prefer-import-in-mock",
735
- "vitest/prefer-importing-vitest-globals",
736
- "vitest/prefer-strict-boolean-matchers",
737
- "vitest/prefer-to-be-falsy",
738
- "vitest/prefer-to-be-object",
739
- "vitest/prefer-to-be-truthy",
740
- "vue/define-emits-declaration",
741
- "vue/define-props-declaration",
742
- "vue/define-props-destructuring",
743
- "vue/require-typed-ref",
744
- "typescript/default-param-last",
745
- "typescript/init-declarations",
746
- "typescript/max-params",
747
- "typescript/no-magic-numbers",
748
731
  "vitest/consistent-test-it",
732
+ "vitest/consistent-vitest-vi",
749
733
  "vitest/max-expects",
750
734
  "vitest/max-nested-describe",
751
735
  "vitest/no-alias-methods",
752
736
  "vitest/no-duplicate-hooks",
753
737
  "vitest/no-hooks",
754
738
  "vitest/no-identical-title",
739
+ "vitest/no-import-node-test",
740
+ "vitest/no-importing-vitest-globals",
755
741
  "vitest/no-interpolation-in-snapshots",
756
742
  "vitest/no-large-snapshots",
757
743
  "vitest/no-mocks-import",
758
- "vitest/no-restricted-jest-methods",
759
744
  "vitest/no-restricted-matchers",
745
+ "vitest/no-restricted-vi-methods",
760
746
  "vitest/no-test-prefixes",
761
747
  "vitest/no-test-return-statement",
762
748
  "vitest/no-unneeded-async-expect-function",
749
+ "vitest/prefer-called-exactly-once-with",
750
+ "vitest/prefer-called-once",
751
+ "vitest/prefer-called-times",
763
752
  "vitest/prefer-called-with",
764
753
  "vitest/prefer-comparison-matcher",
754
+ "vitest/prefer-describe-function-title",
765
755
  "vitest/prefer-each",
766
756
  "vitest/prefer-equality-matcher",
757
+ "vitest/prefer-expect-assertions",
767
758
  "vitest/prefer-expect-resolves",
759
+ "vitest/prefer-expect-type-of",
768
760
  "vitest/prefer-hooks-in-order",
769
761
  "vitest/prefer-hooks-on-top",
762
+ "vitest/prefer-import-in-mock",
763
+ "vitest/prefer-importing-vitest-globals",
770
764
  "vitest/prefer-lowercase-title",
771
765
  "vitest/prefer-mock-promise-shorthand",
772
766
  "vitest/prefer-mock-return-shorthand",
773
767
  "vitest/prefer-spy-on",
768
+ "vitest/prefer-strict-boolean-matchers",
774
769
  "vitest/prefer-strict-equal",
775
770
  "vitest/prefer-to-be",
771
+ "vitest/prefer-to-be-falsy",
772
+ "vitest/prefer-to-be-object",
773
+ "vitest/prefer-to-be-truthy",
776
774
  "vitest/prefer-to-contain",
777
775
  "vitest/prefer-to-have-been-called-times",
778
776
  "vitest/prefer-to-have-length",
779
777
  "vitest/prefer-todo",
780
778
  "vitest/require-hook",
781
- "vitest/require-top-level-describe"
779
+ "vitest/require-top-level-describe",
780
+ "vue/define-emits-declaration",
781
+ "vue/define-props-declaration",
782
+ "vue/define-props-destructuring",
783
+ "vue/require-typed-ref",
784
+ "typescript/default-param-last",
785
+ "typescript/init-declarations",
786
+ "typescript/max-params",
787
+ "typescript/no-magic-numbers"
782
788
  ];
783
789
  const suspiciousRules = [
784
790
  "block-scoped-var",
@@ -786,6 +792,7 @@ const suspiciousRules = [
786
792
  "no-extra-bind",
787
793
  "no-new",
788
794
  "no-shadow",
795
+ "no-underscore-dangle",
789
796
  "no-unexpected-multiline",
790
797
  "no-unmodified-loop-condition",
791
798
  "no-unneeded-ternary",
@@ -828,11 +835,11 @@ const suspiciousRules = [
828
835
  "unicorn/prefer-add-event-listener",
829
836
  "unicorn/require-module-specifiers",
830
837
  "unicorn/require-post-message-target-origin",
838
+ "vitest/no-commented-out-tests",
831
839
  "vue/no-required-prop-with-default",
832
840
  "vue/require-default-export",
833
841
  "typescript/no-shadow",
834
- "typescript/no-useless-constructor",
835
- "vitest/no-commented-out-tests"
842
+ "typescript/no-useless-constructor"
836
843
  ];
837
844
  const restrictionRules = [
838
845
  "class-methods-use-this",
@@ -851,6 +858,7 @@ const restrictionRules = [
851
858
  "no-regex-spaces",
852
859
  "no-restricted-globals",
853
860
  "no-restricted-imports",
861
+ "no-restricted-properties",
854
862
  "no-sequences",
855
863
  "no-undefined",
856
864
  "no-use-before-define",
@@ -876,6 +884,7 @@ const restrictionRules = [
876
884
  "promise/catch-or-return",
877
885
  "promise/spec-only",
878
886
  "react/button-has-type",
887
+ "react/forbid-component-props",
879
888
  "react/forbid-dom-props",
880
889
  "react/forbid-elements",
881
890
  "react/jsx-filename-extension",
@@ -929,6 +938,7 @@ const restrictionRules = [
929
938
  const correctnessRules = [
930
939
  "constructor-super",
931
940
  "for-direction",
941
+ "getter-return",
932
942
  "no-async-promise-executor",
933
943
  "no-caller",
934
944
  "no-class-assign",
@@ -967,6 +977,7 @@ const correctnessRules = [
967
977
  "no-sparse-arrays",
968
978
  "no-this-before-super",
969
979
  "no-unassigned-vars",
980
+ "no-unreachable",
970
981
  "no-unsafe-finally",
971
982
  "no-unsafe-negation",
972
983
  "no-unsafe-optional-chaining",
@@ -1019,6 +1030,7 @@ const correctnessRules = [
1019
1030
  "jsx-a11y/html-has-lang",
1020
1031
  "jsx-a11y/iframe-has-title",
1021
1032
  "jsx-a11y/img-redundant-alt",
1033
+ "jsx-a11y/interactive-supports-focus",
1022
1034
  "jsx-a11y/label-has-associated-control",
1023
1035
  "jsx-a11y/lang",
1024
1036
  "jsx-a11y/media-has-caption",
@@ -1027,6 +1039,7 @@ const correctnessRules = [
1027
1039
  "jsx-a11y/no-aria-hidden-on-focusable",
1028
1040
  "jsx-a11y/no-autofocus",
1029
1041
  "jsx-a11y/no-distracting-elements",
1042
+ "jsx-a11y/no-noninteractive-element-to-interactive-role",
1030
1043
  "jsx-a11y/no-noninteractive-tabindex",
1031
1044
  "jsx-a11y/no-redundant-roles",
1032
1045
  "jsx-a11y/no-static-element-interactions",
@@ -1068,6 +1081,7 @@ const correctnessRules = [
1068
1081
  "react/no-children-prop",
1069
1082
  "react/no-danger-with-children",
1070
1083
  "react/no-did-mount-set-state",
1084
+ "react/no-did-update-set-state",
1071
1085
  "react/no-direct-mutation-state",
1072
1086
  "react/no-find-dom-node",
1073
1087
  "react/no-is-mounted",
@@ -1118,49 +1132,41 @@ const correctnessRules = [
1118
1132
  "unicorn/prefer-set-size",
1119
1133
  "unicorn/prefer-string-starts-ends-with",
1120
1134
  "vitest/consistent-each-for",
1135
+ "vitest/expect-expect",
1121
1136
  "vitest/hoisted-apis-on-top",
1137
+ "vitest/no-conditional-expect",
1122
1138
  "vitest/no-conditional-tests",
1139
+ "vitest/no-disabled-tests",
1140
+ "vitest/no-focused-tests",
1141
+ "vitest/no-standalone-expect",
1142
+ "vitest/prefer-snapshot-hint",
1123
1143
  "vitest/require-awaited-expect-poll",
1124
1144
  "vitest/require-local-test-context-for-concurrent-snapshots",
1125
1145
  "vitest/require-mock-type-parameters",
1146
+ "vitest/require-to-throw-message",
1147
+ "vitest/valid-describe-callback",
1148
+ "vitest/valid-expect",
1149
+ "vitest/valid-expect-in-promise",
1150
+ "vitest/valid-title",
1126
1151
  "vitest/warn-todo",
1127
1152
  "vue/no-arrow-functions-in-watch",
1153
+ "vue/no-deprecated-data-object-declaration",
1154
+ "vue/no-deprecated-delete-set",
1128
1155
  "vue/no-deprecated-destroyed-lifecycle",
1156
+ "vue/no-deprecated-events-api",
1157
+ "vue/no-deprecated-model-definition",
1158
+ "vue/no-deprecated-vue-config-keycodes",
1129
1159
  "vue/no-export-in-script-setup",
1130
1160
  "vue/no-lifecycle-after-await",
1131
1161
  "vue/no-this-in-before-route-enter",
1132
1162
  "vue/prefer-import-from-vue",
1163
+ "vue/return-in-computed-property",
1133
1164
  "vue/valid-define-emits",
1134
1165
  "vue/valid-define-props",
1135
1166
  "typescript/no-dupe-class-members",
1136
1167
  "typescript/no-loss-of-precision",
1137
1168
  "typescript/no-unused-expressions",
1138
- "typescript/no-unused-vars",
1139
- "vitest/expect-expect",
1140
- "vitest/no-conditional-expect",
1141
- "vitest/no-disabled-tests",
1142
- "vitest/no-focused-tests",
1143
- "vitest/no-standalone-expect",
1144
- "vitest/prefer-snapshot-hint",
1145
- "vitest/require-to-throw-message",
1146
- "vitest/valid-describe-callback",
1147
- "vitest/valid-expect",
1148
- "vitest/valid-expect-in-promise",
1149
- "vitest/valid-title"
1150
- ];
1151
- const nurseryRules = [
1152
- "getter-return",
1153
- "no-restricted-exports",
1154
- "no-undef",
1155
- "no-unreachable",
1156
- "no-useless-assignment",
1157
- "import/export",
1158
- "import/named",
1159
- "promise/no-return-in-finally",
1160
- "react/require-render-return",
1161
- "typescript/no-unnecessary-condition",
1162
- "typescript/prefer-optional-chain",
1163
- "unicorn/no-useless-iterator-to-array"
1169
+ "typescript/no-unused-vars"
1164
1170
  ];
1165
1171
  const perfRules = [
1166
1172
  "no-await-in-loop",
@@ -1175,6 +1181,18 @@ const perfRules = [
1175
1181
  "unicorn/prefer-array-flat-map",
1176
1182
  "unicorn/prefer-set-has"
1177
1183
  ];
1184
+ const nurseryRules = [
1185
+ "no-restricted-exports",
1186
+ "no-undef",
1187
+ "no-useless-assignment",
1188
+ "import/export",
1189
+ "import/named",
1190
+ "promise/no-return-in-finally",
1191
+ "react/require-render-return",
1192
+ "typescript/no-unnecessary-condition",
1193
+ "typescript/prefer-optional-chain",
1194
+ "unicorn/no-useless-iterator-to-array"
1195
+ ];
1178
1196
  const typeAwareRules = [
1179
1197
  "typescript/await-thenable",
1180
1198
  "typescript/consistent-return",
@@ -1358,6 +1376,7 @@ var unsupportedRules = {
1358
1376
  "react/static-property-placement": "This rule only applies to legacy class components, which are not widely used in modern React.",
1359
1377
  "react/require-optimization": "This rule only applies to legacy class components, which are not widely used in modern React.",
1360
1378
  "react/prefer-read-only-props": "This rule is niche and primarily applies to legacy class components, which are not widely used in modern React.",
1379
+ "react/prop-types": "PropTypes are ignored in React 19, and TypeScript + the `no-unsafe-xxx` rules already catches unsafe props in most cases.",
1361
1380
  "typescript/sort-type-constituents": "Deprecated, replaced by `perfectionist/sort-intersection-types` and `perfectionist/sort-union-types` rules.",
1362
1381
  "typescript/no-type-alias": "Deprecated, replaced by `typescript-eslint/consistent-type-definitions` rule.",
1363
1382
  "typescript/typedef": "Deprecated.",
@@ -1682,9 +1701,21 @@ const normalizeSeverityValue = (value) => {
1682
1701
  return "off";
1683
1702
  }
1684
1703
  };
1704
+ const equivalentRuleNames = (rule) => {
1705
+ const names = new Set([rule, normalizeRuleToCanonical(rule)]);
1706
+ if (rule.startsWith("@typescript-eslint/")) {
1707
+ const eslintRule = rule.slice(19);
1708
+ if (typescriptRulesExtendEslintRules.includes(eslintRule)) names.add(eslintRule);
1709
+ }
1710
+ return [...names];
1711
+ };
1685
1712
  const removePreviousOverrideRule = (rule, eslintConfig, overrides) => {
1686
1713
  if (eslintConfig.files === void 0 && overrides) {
1687
- for (const override of overrides) if (override.rules?.[rule]) delete override.rules[rule];
1714
+ const names = equivalentRuleNames(rule);
1715
+ for (const override of overrides) {
1716
+ if (!override.rules) continue;
1717
+ for (const name of names) if (name in override.rules) delete override.rules[name];
1718
+ }
1688
1719
  }
1689
1720
  };
1690
1721
  /**
@@ -1736,11 +1767,11 @@ const transformRuleEntry = (eslintConfig, targetConfig, baseConfig, options, ove
1736
1767
  const canonicalRule = normalizeRuleToCanonical(rule);
1737
1768
  if (allRules.includes(canonicalRule)) {
1738
1769
  if (!options?.withNursery && nurseryRules.includes(canonicalRule)) {
1739
- options?.reporter?.markSkipped(rule, "nursery");
1770
+ if (!isOffValue(normalizedConfig)) options?.reporter?.markSkipped(rule, "nursery");
1740
1771
  continue;
1741
1772
  }
1742
1773
  if (!options?.typeAware && typeAwareRules.includes(canonicalRule)) {
1743
- options?.reporter?.markSkipped(rule, "type-aware");
1774
+ if (!isOffValue(normalizedConfig)) options?.reporter?.markSkipped(rule, "type-aware");
1744
1775
  continue;
1745
1776
  }
1746
1777
  if (options?.merge) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxlint/migrate",
3
- "version": "1.61.0",
3
+ "version": "1.64.0",
4
4
  "description": "Generates a `.oxlintrc.json` from a existing eslint flat config",
5
5
  "keywords": [
6
6
  "eslint",
@@ -29,9 +29,8 @@
29
29
  "scripts": {
30
30
  "prepare": "husky",
31
31
  "generate": "node --import @oxc-node/core/register ./scripts/generate.ts",
32
- "generate:vitest": "node --import @oxc-node/core/register ./scripts/generate-vitest-rules.ts",
33
32
  "generate:unsupported": "node --import @oxc-node/core/register ./scripts/fetch-unsupported-rules.ts",
34
- "generate:all": "pnpm generate:vitest && pnpm generate && pnpm generate:unsupported && pnpm format",
33
+ "generate:all": "pnpm generate && pnpm generate:unsupported && pnpm format",
35
34
  "format": "oxfmt",
36
35
  "lint": "oxlint",
37
36
  "test": "vitest",
@@ -41,13 +40,13 @@
41
40
  "dependencies": {
42
41
  "commander": "^14.0.0",
43
42
  "globals": "^17.0.0",
44
- "oxc-parser": "^0.123.0",
43
+ "oxc-parser": "^0.130.0",
45
44
  "tinyglobby": "^0.2.14"
46
45
  },
47
46
  "devDependencies": {
48
47
  "@antfu/eslint-config": "^8.0.0",
49
48
  "@babel/eslint-plugin": "^7.27.1",
50
- "@e18e/eslint-plugin": "^0.3.0",
49
+ "@e18e/eslint-plugin": "^0.4.0",
51
50
  "@eslint-react/eslint-plugin": "^4.0.0",
52
51
  "@eslint/js": "^10.0.0",
53
52
  "@logux/eslint-config": "^57.0.0",
@@ -84,10 +83,10 @@
84
83
  "husky": "^9.1.7",
85
84
  "lint-staged": "^16.1.2",
86
85
  "next": "^16.0.0",
87
- "oxfmt": "^0.43.0",
88
- "oxlint": "^1.61.0",
89
- "oxlint-tsgolint": "^0.19.0",
90
- "tsdown": "^0.21.0",
86
+ "oxfmt": "^0.48.0",
87
+ "oxlint": "^1.64.0",
88
+ "oxlint-tsgolint": "^0.22.0",
89
+ "tsdown": "^0.22.0",
91
90
  "typescript": "^6.0.0",
92
91
  "typescript-eslint": "^8.35.0",
93
92
  "vitest": "^4.0.0"
@@ -95,5 +94,5 @@
95
94
  "lint-staged": {
96
95
  "*": "oxfmt --no-error-on-unmatched-pattern"
97
96
  },
98
- "packageManager": "pnpm@10.33.0"
97
+ "packageManager": "pnpm@10.33.4"
99
98
  }