@oxlint/migrate 1.73.0 → 1.75.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -116,10 +116,10 @@ The JS Plugins API supports almost all ESLint v9+ plugins for linting JS/TS/JSX/
116
116
 
117
117
  For example, if you currently use `eslint-plugin-svelte`, only some of its rules will work via JS Plugin, as Oxlint does not yet fully support custom file formats like `.svelte`. This means that Oxlint will only be able to lint the script blocks in your `.svelte` files, and not the template blocks where many of the `eslint-plugin-svelte` rules apply.
118
118
 
119
- ## ❤ Who's [Sponsoring Oxc](https://github.com/sponsors/Boshen)?
119
+ # [Sponsored By](https://oxc.rs/sponsor)
120
120
 
121
121
  <p align="center">
122
- <a href="https://github.com/sponsors/Boshen">
123
- <img src="https://raw.githubusercontent.com/Boshen/sponsors/main/sponsors.svg" alt="Our sponsors" />
122
+ <a href="https://oxc.rs/sponsor">
123
+ <img src="https://raw.githubusercontent.com/oxc-project/sponsors/main/sponsors.svg" alt="Our sponsors" />
124
124
  </a>
125
125
  </p>
@@ -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-aj7n0D2s.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-V0W_ayvY.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.73.0";
33
+ var version = "1.75.0";
34
34
  //#endregion
35
35
  //#region src/walker/comments/replaceRuleDirectiveComment.ts
36
36
  const allRulesSet = new Set(Object.values(rules_exports).flat());
@@ -425,7 +425,8 @@ const stripJsoncFeatures = (text) => text.replace(/\/\/.*$/gm, "").replace(/\/\*
425
425
  * type-aware linting.
426
426
  */
427
427
  const warnIfTsconfigHasBaseUrl = (reporter) => {
428
- const content = getFileContent(path.join(cwd, "tsconfig.json"));
428
+ const tsconfigPath = path.join(cwd, "tsconfig.json");
429
+ const content = getFileContent(tsconfigPath);
429
430
  if (content === void 0) return;
430
431
  try {
431
432
  const tsconfig = JSON.parse(stripJsoncFeatures(content));
@@ -4,7 +4,13 @@
4
4
  /**
5
5
  * What to enforce for `/// <reference types="..." />` references.
6
6
  */
7
- //#region node_modules/.pnpm/oxlint@1.73.0_oxlint-tsgolint@0.24.0/node_modules/oxlint/dist/index.d.ts
7
+ /**
8
+ * What to enforce for `/// <reference path="..." />` references.
9
+ */
10
+ /**
11
+ * What to enforce for `/// <reference types="..." />` references.
12
+ */
13
+ //#region node_modules/.pnpm/oxlint@1.75.0_oxlint-tsgolint@0.24.0/node_modules/oxlint/dist/index.d.ts
8
14
  //#region src-js/package/config.generated.d.ts
9
15
  type AllowWarnDeny = ("allow" | "off" | "warn" | "error" | "deny") | number;
10
16
  type GlobalValue = ("readonly" | "writable" | "off") | undefined;
@@ -70,7 +76,7 @@ type FuncNamesConfigType = "always" | "as-needed" | "never";
70
76
  type Style = "expression" | "declaration";
71
77
  type NamedExports = "ignore" | "expression" | "declaration";
72
78
  type PairOrder = "anyOrder" | "getBeforeSet" | "setBeforeGet";
73
- type Mode = "prefer-top-level" | "prefer-inline";
79
+ type Mode = "prefer-top-level" | "prefer-inline" | "prefer-top-level-if-only-type-imports";
74
80
  /**
75
81
  * Extension rule configuration; Copy to avoid extra indirection.
76
82
  */
@@ -115,6 +121,7 @@ type AllowKind = "functions" | "arrowFunctions" | "generatorFunctions" | "method
115
121
  */
116
122
  type NoInnerDeclarationsConfig = "functions" | "both";
117
123
  type BlockScopedFunctions = "allow" | "disallow";
124
+ type Namespaces = "allow" | "disallow";
118
125
  type NoMagicNumbersNumber = number | string;
119
126
  type NoRestrictedImportsConfigEnum = string | RestrictedPath | NoRestrictedImportsConfig;
120
127
  type PossiblePaths = string | RestrictedPath;
@@ -180,6 +187,10 @@ type ForbidItem2 = string | {
180
187
  */
181
188
  message?: string;
182
189
  };
190
+ type NamedComponents = NamedComponentStyle | NamedComponentStyle[];
191
+ type NamedComponentStyle = "function-declaration" | "arrow-function" | "function-expression";
192
+ type UnnamedComponents = UnnamedComponentStyle | UnnamedComponentStyle[];
193
+ type UnnamedComponentStyle = "arrow-function" | "function-expression";
183
194
  type EnforceBooleanAttribute = "always" | "never";
184
195
  type JsxCurlyBracePresenceConfig = JsxCurlyBracePresenceMode | JsxCurlyBracePresence;
185
196
  type JsxCurlyBracePresenceMode = "always" | "never" | "ignore";
@@ -483,7 +494,10 @@ interface Oxlintrc$1 {
483
494
  */
484
495
  globals?: OxlintGlobals;
485
496
  /**
486
- * Globs to ignore during linting. These are resolved from the configuration file path.
497
+ * Globs to ignore during linting. Patterns use gitignore-style matching,
498
+ * rooted at the directory containing the configuration file.
499
+ * Files outside that directory cannot be matched; patterns containing `..`
500
+ * are rejected as a configuration error.
487
501
  */
488
502
  ignorePatterns?: string[];
489
503
  /**
@@ -924,7 +938,7 @@ interface DummyRuleMap {
924
938
  "jsdoc/empty-tags"?: RuleNoConfig | [AllowWarnDeny, EmptyTagsConfig];
925
939
  "jsdoc/implements-on-classes"?: RuleNoConfig;
926
940
  "jsdoc/no-defaults"?: RuleNoConfig | [AllowWarnDeny, NoDefaultsConfig];
927
- "jsdoc/require-param"?: DummyRule;
941
+ "jsdoc/require-param"?: RuleNoConfig | [AllowWarnDeny, RequireParamConfig];
928
942
  "jsdoc/require-param-description"?: RuleNoConfig | [AllowWarnDeny, RequireParamDescriptionConfig];
929
943
  "jsdoc/require-param-name"?: RuleNoConfig;
930
944
  "jsdoc/require-param-type"?: RuleNoConfig | [AllowWarnDeny, RequireParamTypeConfig];
@@ -1139,6 +1153,7 @@ interface DummyRuleMap {
1139
1153
  "node/no-path-concat"?: RuleNoConfig;
1140
1154
  "node/no-process-env"?: RuleNoConfig | [AllowWarnDeny, NoProcessEnvConfig];
1141
1155
  "node/no-sync"?: RuleNoConfig | [AllowWarnDeny, NoSyncConfig];
1156
+ "node/no-top-level-await"?: RuleNoConfig | [AllowWarnDeny, NoTopLevelAwaitConfig];
1142
1157
  "object-shorthand"?: RuleNoConfig | [AllowWarnDeny, ShorthandType] | [AllowWarnDeny, ShorthandType, ObjectShorthandOptions];
1143
1158
  "operator-assignment"?: RuleNoConfig | [AllowWarnDeny, AlwaysNever];
1144
1159
  "oxc/approx-constant"?: RuleNoConfig;
@@ -1169,7 +1184,7 @@ interface DummyRuleMap {
1169
1184
  "oxc/uninvoked-array-callback"?: RuleNoConfig;
1170
1185
  "prefer-arrow-callback"?: RuleNoConfig | [AllowWarnDeny, PreferArrowCallbackConfig];
1171
1186
  "prefer-const"?: RuleNoConfig | [AllowWarnDeny, PreferConstConfig];
1172
- "prefer-destructuring"?: RuleNoConfig | [AllowWarnDeny, PreferDestructuringOption] | [AllowWarnDeny, PreferDestructuringOption, PreferDestructuringRenamedPropertiesConfig];
1187
+ "prefer-destructuring"?: RuleNoConfig | [AllowWarnDeny, PreferDestructuringOption] | [AllowWarnDeny, PreferDestructuringOption, PreferDestructuringEnforcementConfig];
1173
1188
  "prefer-exponentiation-operator"?: RuleNoConfig;
1174
1189
  "prefer-named-capture-group"?: RuleNoConfig;
1175
1190
  "prefer-numeric-literals"?: RuleNoConfig;
@@ -1210,6 +1225,7 @@ interface DummyRuleMap {
1210
1225
  "react/forbid-dom-props"?: RuleNoConfig | [AllowWarnDeny, ForbidDomPropsConfig];
1211
1226
  "react/forbid-elements"?: RuleNoConfig | [AllowWarnDeny, ForbidElementsConfig];
1212
1227
  "react/forward-ref-uses-ref"?: RuleNoConfig;
1228
+ "react/function-component-definition"?: RuleNoConfig | [AllowWarnDeny, FunctionComponentDefinitionConfig];
1213
1229
  "react/hook-use-state"?: RuleNoConfig | [AllowWarnDeny, HookUseStateConfig];
1214
1230
  "react/iframe-missing-sandbox"?: RuleNoConfig;
1215
1231
  "react/jsx-boolean-value"?: RuleNoConfig | [AllowWarnDeny, EnforceBooleanAttribute] | [AllowWarnDeny, EnforceBooleanAttribute, JsxBooleanValueOptions];
@@ -1554,6 +1570,7 @@ interface DummyRuleMap {
1554
1570
  "vitest/no-test-return-statement"?: RuleNoConfig;
1555
1571
  "vitest/no-unneeded-async-expect-function"?: RuleNoConfig;
1556
1572
  "vitest/padding-around-after-all-blocks"?: RuleNoConfig;
1573
+ "vitest/padding-around-test-blocks"?: RuleNoConfig;
1557
1574
  "vitest/prefer-called-exactly-once-with"?: RuleNoConfig;
1558
1575
  "vitest/prefer-called-once"?: RuleNoConfig;
1559
1576
  "vitest/prefer-called-times"?: RuleNoConfig;
@@ -2349,6 +2366,56 @@ interface NoDefaultsConfig {
2349
2366
  */
2350
2367
  noOptionalParamNames?: boolean;
2351
2368
  }
2369
+ interface RequireParamConfig {
2370
+ /**
2371
+ * Whether to check constructor methods.
2372
+ */
2373
+ checkConstructors?: boolean;
2374
+ /**
2375
+ * Whether to check destructured parameters.
2376
+ */
2377
+ checkDestructured?: boolean;
2378
+ /**
2379
+ * Whether to check destructured parameters when you have code like
2380
+ * `function doSomething({ a, b }) { ... }`. Because there is no named
2381
+ * parameter in this example, when this option is `true` you must
2382
+ * have a `@param` tag that corresponds to `{a, b}`.
2383
+ */
2384
+ checkDestructuredRoots?: boolean;
2385
+ /**
2386
+ * Whether to check getter methods.
2387
+ */
2388
+ checkGetters?: boolean;
2389
+ /**
2390
+ * Whether to check rest properties.
2391
+ */
2392
+ checkRestProperty?: boolean;
2393
+ /**
2394
+ * Whether to check setter methods.
2395
+ */
2396
+ checkSetters?: boolean;
2397
+ /**
2398
+ * Regex pattern to match types that exempt parameters from checking.
2399
+ */
2400
+ checkTypesPattern?: string;
2401
+ /**
2402
+ * List of JSDoc tags that exempt functions from `@param` checking.
2403
+ */
2404
+ exemptedBy?: string[];
2405
+ /**
2406
+ * Set to `true` to ignore reporting when all params are missing. Defaults to `false`.
2407
+ */
2408
+ ignoreWhenAllParamsMissing?: boolean;
2409
+ /**
2410
+ * Set if you wish TypeScript interfaces to exempt checks for the existence of `@param`'s.
2411
+ * Will check for a type defining the function itself (on a variable declaration) or if there is a single destructured object with a type. Defaults to `false`.
2412
+ */
2413
+ interfaceExemptsParamsCheck?: boolean;
2414
+ /**
2415
+ * Set to `true` if you wish to expect documentation of properties on objects supplied as default values. Defaults to `false`.
2416
+ */
2417
+ useDefaultObjectProperties?: boolean;
2418
+ }
2352
2419
  interface RequireParamDescriptionConfig {
2353
2420
  /**
2354
2421
  * The description string to set by default for destructured roots. Defaults to "The root object".
@@ -3028,6 +3095,10 @@ interface NoInnerDeclarationsOptions {
3028
3095
  * Controls whether function declarations in nested blocks are allowed in strict mode (ES6+ behavior).
3029
3096
  */
3030
3097
  blockScopedFunctions?: BlockScopedFunctions;
3098
+ /**
3099
+ * Controls whether declarations directly inside TypeScript namespace or module bodies are allowed.
3100
+ */
3101
+ namespaces?: Namespaces;
3031
3102
  }
3032
3103
  interface NoInvalidRegexpConfig {
3033
3104
  /**
@@ -3881,6 +3952,14 @@ interface NoSyncConfig {
3881
3952
  */
3882
3953
  ignores?: string[];
3883
3954
  }
3955
+ interface NoTopLevelAwaitConfig {
3956
+ /**
3957
+ * If `true`, top-level `await` is allowed in files that start with a
3958
+ * hashbang (`#!`), which marks them as executable scripts rather than
3959
+ * importable modules.
3960
+ */
3961
+ ignoreBin?: boolean;
3962
+ }
3884
3963
  interface ObjectShorthandOptions {
3885
3964
  avoidExplicitReturnArrows?: boolean;
3886
3965
  avoidQuotes?: boolean;
@@ -3983,7 +4062,8 @@ interface PreferDestructuringAssignmentConfig {
3983
4062
  AssignmentExpression?: PreferDestructuringTargetOption;
3984
4063
  VariableDeclarator?: PreferDestructuringTargetOption;
3985
4064
  }
3986
- interface PreferDestructuringRenamedPropertiesConfig {
4065
+ interface PreferDestructuringEnforcementConfig {
4066
+ enforceForDeclarationWithTypeAnnotation?: boolean;
3987
4067
  enforceForRenamedProperties?: boolean;
3988
4068
  }
3989
4069
  interface PreferPromiseRejectErrors {
@@ -4349,6 +4429,10 @@ interface ForbidElementsConfig {
4349
4429
  */
4350
4430
  forbid?: ForbidItem2[];
4351
4431
  }
4432
+ interface FunctionComponentDefinitionConfig {
4433
+ namedComponents?: NamedComponents;
4434
+ unnamedComponents?: UnnamedComponents;
4435
+ }
4352
4436
  interface HookUseStateConfig {
4353
4437
  /**
4354
4438
  * When true the rule will ignore the name of the destructured value.
@@ -5795,7 +5879,13 @@ interface TripleSlashReferenceConfig {
5795
5879
  * What to enforce for `/// <reference lib="..." />` references.
5796
5880
  */
5797
5881
  lib?: AlwaysNever;
5882
+ /**
5883
+ * What to enforce for `/// <reference path="..." />` references.
5884
+ */
5798
5885
  path?: PathOption;
5886
+ /**
5887
+ * What to enforce for `/// <reference types="..." />` references.
5888
+ */
5799
5889
  types?: TypesOption;
5800
5890
  }
5801
5891
  interface UnboundMethodConfig {
@@ -6331,6 +6421,9 @@ interface NoReservedPropsConfig {
6331
6421
  vueVersion?: number;
6332
6422
  }
6333
6423
  interface Options$1 {
6424
+ /**
6425
+ * Prop names to ignore, as regular expression patterns.
6426
+ */
6334
6427
  ignoreProps?: string[];
6335
6428
  }
6336
6429
  interface RequireDirectExport {
@@ -6649,18 +6742,13 @@ interface VitestPluginSettings {
6649
6742
  */
6650
6743
  typecheck?: boolean;
6651
6744
  [k: string]: unknown | undefined;
6652
- } //#endregion
6745
+ }
6746
+ //#endregion
6653
6747
  //#region src-js/package/config.d.ts
6654
6748
  type Oxlintrc = Omit<Oxlintrc$1, "$schema" | "extends">;
6655
6749
  interface OxlintConfig$1 extends Oxlintrc {
6656
6750
  extends?: OxlintConfig$1[];
6657
6751
  }
6658
- /**
6659
- * Define an Oxlint configuration with type inference.
6660
- *
6661
- * @param config - Oxlint configuration
6662
- * @returns Config unchanged
6663
- */
6664
6752
  //#endregion
6665
6753
  //#region src/types.d.ts
6666
6754
  /**
@@ -6733,7 +6821,9 @@ declare namespace ESLint {
6733
6821
  ignores?: string[];
6734
6822
  /** Language options including globals, parser, etc */
6735
6823
  languageOptions?: {
6736
- /** Global variables */globals?: GlobalsConfig; /** Parser options */
6824
+ /** Global variables */
6825
+ globals?: GlobalsConfig;
6826
+ /** Parser options */
6737
6827
  parserOptions?: Record<string, unknown>;
6738
6828
  [key: string]: unknown;
6739
6829
  };
@@ -1,2 +1,2 @@
1
- import { t as main } from "../src-aj7n0D2s.mjs";
1
+ import { t as main } from "../src-V0W_ayvY.mjs";
2
2
  export { main as default };
@@ -389,7 +389,8 @@ const cleanUpUnusedJsPlugins = (config) => {
389
389
  if (config.jsPlugins === void 0 || config.jsPlugins === null || config.jsPlugins.length === 0) return;
390
390
  const ruleNames = Object.keys(config.rules ?? {});
391
391
  config.jsPlugins = config.jsPlugins.filter((entry) => {
392
- return hasRulesForPlugin(ruleNames, typeof entry === "string" ? entry : entry.specifier);
392
+ const packageName = typeof entry === "string" ? entry : entry.specifier;
393
+ return hasRulesForPlugin(ruleNames, packageName);
393
394
  });
394
395
  if (config.jsPlugins.length === 0) delete config.jsPlugins;
395
396
  };
@@ -661,6 +662,7 @@ const styleRules = [
661
662
  "promise/prefer-await-to-callbacks",
662
663
  "promise/prefer-await-to-then",
663
664
  "promise/prefer-catch",
665
+ "react/function-component-definition",
664
666
  "react/hook-use-state",
665
667
  "react/jsx-boolean-value",
666
668
  "react/jsx-curly-brace-presence",
@@ -769,6 +771,7 @@ const styleRules = [
769
771
  "vitest/no-test-return-statement",
770
772
  "vitest/no-unneeded-async-expect-function",
771
773
  "vitest/padding-around-after-all-blocks",
774
+ "vitest/padding-around-test-blocks",
772
775
  "vitest/prefer-called-exactly-once-with",
773
776
  "vitest/prefer-called-once",
774
777
  "vitest/prefer-called-times",
@@ -915,6 +918,7 @@ const restrictionRules = [
915
918
  "node/no-new-require",
916
919
  "node/no-path-concat",
917
920
  "node/no-process-env",
921
+ "node/no-top-level-await",
918
922
  "promise/catch-or-return",
919
923
  "promise/spec-only",
920
924
  "react/button-has-type",
@@ -1323,6 +1327,25 @@ var unsupportedRules = {
1323
1327
  "import/no-unresolved": "Will always contain false positives due to module resolution complexity.",
1324
1328
  "promise/no-native": "Handled by `eslint/no-undef`.",
1325
1329
  "unicorn/no-for-loop": "This rule suggests using `Array.prototype.entries` which is slow https://github.com/oxc-project/oxc/issues/11311, furthermore, `typescript/prefer-for-of` covers most cases.",
1330
+ "unicorn/no-useless-coercion": "No need to implement, already implemented by `typescript/no-unnecessary-type-conversion` via tsgolint.",
1331
+ "unicorn/no-unnecessary-boolean-comparison": "No need to implement, already implemented by `typescript/no-unnecessary-boolean-literal-compare` via tsgolint.",
1332
+ "unicorn/no-nonstandard-builtin-properties": "No need to implement, TypeScript type checking reports non-standard properties and invalid calls or constructions on built-ins.",
1333
+ "unicorn/no-boolean-sort-comparator": "No need to implement, TypeScript type checking requires array sort comparators to return numbers.",
1334
+ "unicorn/no-invalid-argument-count": "No need to implement, TypeScript type checking reports invalid argument counts for functions, constructors, and built-in APIs.",
1335
+ "unicorn/no-useless-template-literals": "No need to implement. `typescript/no-unnecessary-template-expression` covers static and already-string expressions, while `eslint/no-implicit-coercion` with `disallowTemplateShorthand` covers expression-only string coercions.",
1336
+ "unicorn/prefer-explicit-viewport-units": "Not currently possible, as full support requires parsing standalone CSS files.",
1337
+ "unicorn/require-frontmatter-fields": "Not currently possible, as it requires parsing YAML frontmatter in Markdown files.",
1338
+ "unicorn/no-missing-local-resource": "Not currently possible, as it requires parsing standalone Markdown, HTML, and CSS files and resolving their local resources.",
1339
+ "unicorn/no-transition-all": "Not currently possible, as full support requires parsing standalone CSS files.",
1340
+ "unicorn/no-shorthand-property-overrides": "Not currently possible, as it requires parsing standalone CSS files.",
1341
+ "unicorn/require-proxy-trap-boolean-return": "No need to implement, TypeScript type checking enforces boolean return types for the relevant `ProxyHandler` traps.",
1342
+ "unicorn/consistent-class-member-order": "Use `typescript/member-ordering` instead, which can be configured with the same class member group order and will be supported in Oxlint.",
1343
+ "unicorn/no-collection-bracket-access": "No need to implement, TypeScript type checking reports invalid bracket access on `Map`, `Set`, `WeakMap`, and `WeakSet` values.",
1344
+ "unicorn/no-accidental-bitwise-operator": "No need to implement, already covered by `oxc/bad-bitwise-operator`.",
1345
+ "unicorn/no-misrefactored-assignment": "No need to implement, already covered by `oxc/misrefactored-assign-op`.",
1346
+ "unicorn/no-constant-zero-expression": "No need to implement, already covered by `oxc/erasing-op`.",
1347
+ "unicorn/prefer-math-constants": "No need to implement, already covered by `oxc/approx-constant`.",
1348
+ "unicorn/require-array-sort-compare": "No need to implement, already implemented by `typescript/require-array-sort-compare` via tsgolint.",
1326
1349
  "eslint/no-negated-in-lhs": "Replaced by `eslint/no-unsafe-negation`, which we support.",
1327
1350
  "eslint/no-catch-shadow": "Replaced by `eslint/no-shadow`.",
1328
1351
  "eslint/id-blacklist": "Replaced by `eslint/id-denylist`.",
@@ -1363,8 +1386,13 @@ var unsupportedRules = {
1363
1386
  "n/prefer-global/timers": "No need to implement, the same policy can be enforced with generic restriction rules such as `no-restricted-imports` and `no-restricted-globals`.",
1364
1387
  "n/prefer-global/url": "No need to implement, the same policy can be enforced with generic restriction rules such as `no-restricted-imports` and `no-restricted-globals`.",
1365
1388
  "n/prefer-global/url-search-params": "No need to implement, the same policy can be enforced with generic restriction rules such as `no-restricted-imports` and `no-restricted-globals`.",
1389
+ "n/no-unpublished-bin": "No support for this rule in Oxlint, as it requires knowledge of the package.json file and its `bin` field.",
1366
1390
  "import/order": "Not implementing this in Oxlint as its behavior is covered very well by [Oxfmt's import sorting](https://oxc.rs/docs/guide/usage/formatter/sorting.html).",
1367
1391
  "unicorn/template-indent": "Stylistic rule.",
1392
+ "unicorn/no-non-function-verb-prefix": "Requires type information. Not currently possible to implement in oxlint.",
1393
+ "unicorn/prefer-json-parse-buffer": "Deprecated.",
1394
+ "unicorn/prevent-abbreviations": "Deprecated.",
1395
+ "unicorn/better-regex": "Deprecated.",
1368
1396
  "jsdoc/type-formatting": "Experimental rule in the original plugin, may reconsider once stable.",
1369
1397
  "jsdoc/convert-to-jsdoc-comments": "Experimental rule in the original plugin, may reconsider once stable.",
1370
1398
  "jsdoc/check-examples": "Deprecated.",
@@ -1403,35 +1431,35 @@ var unsupportedRules = {
1403
1431
  "react/jsx-sort-props": "Stylistic rule from eslint-plugin-react. Should use Oxfmt for stylistic rules, or use JS Plugins to enable this rule.",
1404
1432
  "react/no-adjacent-inline-elements": "Stylistic rule from eslint-plugin-react. Should use Oxfmt for stylistic rules, or use JS Plugins to enable this rule.",
1405
1433
  "react/no-deprecated": "No need to implement, already implemented by `typescript/no-deprecated` via tsgolint.",
1406
- "react/config": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
1407
- "react/error-boundaries": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
1408
- "react/component-hook-factories": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
1409
- "react/gating": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
1410
- "react/globals": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
1411
- "react/immutability": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
1412
- "react/preserve-manual-memoization": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
1413
- "react/purity": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
1414
- "react/refs": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
1415
- "react/set-state-in-effect": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
1416
- "react/set-state-in-render": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
1417
- "react/static-components": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
1418
- "react/unsupported-syntax": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
1419
- "react/use-memo": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
1420
- "react/incompatible-library": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
1421
- "react/automatic-effect-dependencies": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
1422
- "react/memo-dependencies": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
1423
- "react/exhaustive-effect-dependencies": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
1424
- "react/capitalized-calls": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
1425
- "react/fbt": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
1426
- "react/fire": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
1427
- "react/invariant": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
1428
- "react/hooks": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
1429
- "react/memoized-effect-dependencies": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
1430
- "react/no-deriving-state-in-effects": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
1431
- "react/rule-suppression": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
1432
- "react/syntax": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
1433
- "react/todo": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
1434
- "react/void-use-memo": "React Compiler rules will not be implemented in oxlint for now, as they require integration with the react compiler itself. These rules can be used via JS Plugins if desired.",
1434
+ "react/config": "React Compiler rules are implemented experimentally as `react/react-compiler`. We will split them into separate rules once they stabilize.",
1435
+ "react/error-boundaries": "React Compiler rules are implemented experimentally as `react/react-compiler`. We will split them into separate rules once they stabilize.",
1436
+ "react/component-hook-factories": "React Compiler rules are implemented experimentally as `react/react-compiler`. We will split them into separate rules once they stabilize.",
1437
+ "react/gating": "React Compiler rules are implemented experimentally as `react/react-compiler`. We will split them into separate rules once they stabilize.",
1438
+ "react/globals": "React Compiler rules are implemented experimentally as `react/react-compiler`. We will split them into separate rules once they stabilize.",
1439
+ "react/immutability": "React Compiler rules are implemented experimentally as `react/react-compiler`. We will split them into separate rules once they stabilize.",
1440
+ "react/preserve-manual-memoization": "React Compiler rules are implemented experimentally as `react/react-compiler`. We will split them into separate rules once they stabilize.",
1441
+ "react/purity": "React Compiler rules are implemented experimentally as `react/react-compiler`. We will split them into separate rules once they stabilize.",
1442
+ "react/refs": "React Compiler rules are implemented experimentally as `react/react-compiler`. We will split them into separate rules once they stabilize.",
1443
+ "react/set-state-in-effect": "React Compiler rules are implemented experimentally as `react/react-compiler`. We will split them into separate rules once they stabilize.",
1444
+ "react/set-state-in-render": "React Compiler rules are implemented experimentally as `react/react-compiler`. We will split them into separate rules once they stabilize.",
1445
+ "react/static-components": "React Compiler rules are implemented experimentally as `react/react-compiler`. We will split them into separate rules once they stabilize.",
1446
+ "react/unsupported-syntax": "React Compiler rules are implemented experimentally as `react/react-compiler`. We will split them into separate rules once they stabilize.",
1447
+ "react/use-memo": "React Compiler rules are implemented experimentally as `react/react-compiler`. We will split them into separate rules once they stabilize.",
1448
+ "react/incompatible-library": "React Compiler rules are implemented experimentally as `react/react-compiler`. We will split them into separate rules once they stabilize.",
1449
+ "react/automatic-effect-dependencies": "React Compiler rules are implemented experimentally as `react/react-compiler`. We will split them into separate rules once they stabilize.",
1450
+ "react/memo-dependencies": "React Compiler rules are implemented experimentally as `react/react-compiler`. We will split them into separate rules once they stabilize.",
1451
+ "react/exhaustive-effect-dependencies": "React Compiler rules are implemented experimentally as `react/react-compiler`. We will split them into separate rules once they stabilize.",
1452
+ "react/capitalized-calls": "React Compiler rules are implemented experimentally as `react/react-compiler`. We will split them into separate rules once they stabilize.",
1453
+ "react/fbt": "React Compiler rules are implemented experimentally as `react/react-compiler`. We will split them into separate rules once they stabilize.",
1454
+ "react/fire": "React Compiler rules are implemented experimentally as `react/react-compiler`. We will split them into separate rules once they stabilize.",
1455
+ "react/invariant": "React Compiler rules are implemented experimentally as `react/react-compiler`. We will split them into separate rules once they stabilize.",
1456
+ "react/hooks": "React Compiler rules are implemented experimentally as `react/react-compiler`. We will split them into separate rules once they stabilize.",
1457
+ "react/memoized-effect-dependencies": "React Compiler rules are implemented experimentally as `react/react-compiler`. We will split them into separate rules once they stabilize.",
1458
+ "react/no-deriving-state-in-effects": "React Compiler rules are implemented experimentally as `react/react-compiler`. We will split them into separate rules once they stabilize.",
1459
+ "react/rule-suppression": "React Compiler rules are implemented experimentally as `react/react-compiler`. We will split them into separate rules once they stabilize.",
1460
+ "react/syntax": "React Compiler rules are implemented experimentally as `react/react-compiler`. We will split them into separate rules once they stabilize.",
1461
+ "react/todo": "React Compiler rules are implemented experimentally as `react/react-compiler`. We will split them into separate rules once they stabilize.",
1462
+ "react/void-use-memo": "React Compiler rules are implemented experimentally as `react/react-compiler`. We will split them into separate rules once they stabilize.",
1435
1463
  "react/default-props-match-prop-types": "This rule only applies to legacy class components, which are not widely used in modern React. Also stylistic.",
1436
1464
  "react/forbid-foreign-prop-types": "PropTypes are ignored in React 19, and this rule is only relevant for very specific use-cases involving it.",
1437
1465
  "react/forbid-prop-types": "PropTypes are ignored in React 19, and this rule is only relevant if you use the PropTypes package.",
@@ -1655,6 +1683,7 @@ var unsupportedRules = {
1655
1683
  "vue/prefer-separate-static-class": "Not currently possible, as it requires Vue template parsing.",
1656
1684
  "vue/prefer-template": "Not currently possible, as it requires Vue template parsing.",
1657
1685
  "vue/prefer-true-attribute-shorthand": "Not currently possible, as it requires Vue template parsing.",
1686
+ "vue/prefer-v-model": "Not currently possible, as it requires Vue template parsing.",
1658
1687
  "vue/quote-props": "Stylistic rule.",
1659
1688
  "vue/require-component-is": "Not currently possible, as it requires Vue template parsing.",
1660
1689
  "vue/require-explicit-emits": "Not currently possible, as it requires Vue template parsing.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxlint/migrate",
3
- "version": "1.73.0",
3
+ "version": "1.75.0",
4
4
  "description": "Generates a `.oxlintrc.json` from a existing eslint flat config",
5
5
  "keywords": [
6
6
  "eslint",
@@ -26,21 +26,10 @@
26
26
  "types": "./dist/src/index.d.mts",
27
27
  "import": "./dist/src/index.mjs"
28
28
  },
29
- "scripts": {
30
- "prepare": "husky",
31
- "generate": "node --import @oxc-node/core/register ./scripts/generate.ts",
32
- "generate:unsupported": "node --import @oxc-node/core/register ./scripts/fetch-unsupported-rules.ts",
33
- "generate:all": "pnpm generate && pnpm generate:unsupported && pnpm format",
34
- "format": "oxfmt",
35
- "lint": "oxlint",
36
- "test": "vitest",
37
- "build": "tsdown",
38
- "manual-test": "pnpm build; chmod +x dist/bin/oxlint-migrate.mjs; npx ."
39
- },
40
29
  "dependencies": {
41
30
  "commander": "^15.0.0",
42
31
  "globals": "^17.0.0",
43
- "oxc-parser": "^0.138.0",
32
+ "oxc-parser": "^0.139.0",
44
33
  "tinyglobby": "^0.2.14"
45
34
  },
46
35
  "devDependencies": {
@@ -83,8 +72,8 @@
83
72
  "husky": "^9.1.7",
84
73
  "lint-staged": "^17.0.0",
85
74
  "next": "^16.0.0",
86
- "oxfmt": "^0.57.0",
87
- "oxlint": "^1.73.0",
75
+ "oxfmt": "^0.58.0",
76
+ "oxlint": "^1.75.0",
88
77
  "oxlint-tsgolint": "^0.24.0",
89
78
  "tsdown": "^0.22.0",
90
79
  "typescript": "^6.0.0",
@@ -94,5 +83,14 @@
94
83
  "lint-staged": {
95
84
  "*": "oxfmt --no-error-on-unmatched-pattern"
96
85
  },
97
- "packageManager": "pnpm@11.9.0"
98
- }
86
+ "scripts": {
87
+ "generate": "node --import @oxc-node/core/register ./scripts/generate.ts",
88
+ "generate:unsupported": "node --import @oxc-node/core/register ./scripts/fetch-unsupported-rules.ts",
89
+ "generate:all": "pnpm generate && pnpm generate:unsupported && pnpm format",
90
+ "format": "oxfmt",
91
+ "lint": "oxlint",
92
+ "test": "vitest",
93
+ "build": "tsdown",
94
+ "manual-test": "pnpm build; chmod +x dist/bin/oxlint-migrate.mjs; npx ."
95
+ }
96
+ }