@oxlint/migrate 1.22.0 → 1.24.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,4 +1,4 @@
1
- const version = "1.22.0";
1
+ const version = "1.24.0";
2
2
  const packageJson = {
3
3
  version
4
4
  };
@@ -107,14 +107,16 @@ const detectEnvironmentByGlobals = (config) => {
107
107
  }
108
108
  };
109
109
  const transformEnvAndGlobals = (eslintConfig, targetConfig, options) => {
110
- if (eslintConfig.languageOptions?.parser !== void 0 && !SUPPORTED_ESLINT_PARSERS.includes(
110
+ if (eslintConfig.languageOptions?.parser !== void 0 && eslintConfig.languageOptions?.parser !== null && typeof eslintConfig.languageOptions.parser === "object" && "meta" in eslintConfig.languageOptions.parser && !SUPPORTED_ESLINT_PARSERS.includes(
111
+ // @ts-ignore
111
112
  eslintConfig.languageOptions.parser.meta?.name
112
113
  )) {
113
114
  options?.reporter !== void 0 && options.reporter(
114
- "special parser detected: " + eslintConfig.languageOptions.parser.meta?.name
115
+ "special parser detected: " + // @ts-ignore
116
+ eslintConfig.languageOptions.parser.meta?.name
115
117
  );
116
118
  }
117
- if (eslintConfig.languageOptions?.globals !== void 0) {
119
+ if (eslintConfig.languageOptions?.globals !== void 0 && eslintConfig.languageOptions?.globals !== null) {
118
120
  if (targetConfig.globals === void 0) {
119
121
  targetConfig.globals = {};
120
122
  }
@@ -131,7 +133,7 @@ const transformEnvAndGlobals = (eslintConfig, targetConfig, options) => {
131
133
  }
132
134
  }
133
135
  if (eslintConfig.languageOptions?.ecmaVersion !== void 0) {
134
- if (eslintConfig.languageOptions?.ecmaVersion === "latest") {
136
+ if (eslintConfig.languageOptions.ecmaVersion === "latest") {
135
137
  if (targetConfig.env === void 0) {
136
138
  targetConfig.env = {};
137
139
  }
@@ -139,11 +141,11 @@ const transformEnvAndGlobals = (eslintConfig, targetConfig, options) => {
139
141
  if (!(latestVersion in targetConfig.env)) {
140
142
  targetConfig.env[latestVersion] = true;
141
143
  }
142
- } else if (ES_VERSIONS.includes(eslintConfig.languageOptions?.ecmaVersion)) {
144
+ } else if (typeof eslintConfig.languageOptions.ecmaVersion === "number" && ES_VERSIONS.includes(eslintConfig.languageOptions.ecmaVersion)) {
143
145
  if (targetConfig.env === void 0) {
144
146
  targetConfig.env = {};
145
147
  }
146
- const targetVersion = `es${eslintConfig.languageOptions?.ecmaVersion}`;
148
+ const targetVersion = `es${eslintConfig.languageOptions.ecmaVersion}`;
147
149
  if (!(targetVersion in targetConfig.env)) {
148
150
  targetConfig.env[targetVersion] = true;
149
151
  }
@@ -2,6 +2,6 @@ export declare const pedanticRules: string[];
2
2
  export declare const styleRules: string[];
3
3
  export declare const suspiciousRules: string[];
4
4
  export declare const restrictionRules: string[];
5
- export declare const correctnessRules: string[];
6
5
  export declare const nurseryRules: string[];
6
+ export declare const correctnessRules: string[];
7
7
  export declare const perfRules: string[];
@@ -20,6 +20,7 @@ const pedanticRules = [
20
20
  "no-redeclare",
21
21
  "no-self-compare",
22
22
  "no-throw-literal",
23
+ "no-warning-comments",
23
24
  "radix",
24
25
  "require-await",
25
26
  "sort-vars",
@@ -397,14 +398,17 @@ const restrictionRules = [
397
398
  "jsdoc/check-access",
398
399
  "jsdoc/empty-tags",
399
400
  "jsx-a11y/anchor-ambiguous-text",
401
+ "node/no-process-env",
400
402
  "node/no-new-require",
401
403
  "promise/catch-or-return",
402
404
  "promise/spec-only",
403
405
  "react/button-has-type",
406
+ "react/forbid-dom-props",
404
407
  "react/forbid-elements",
405
408
  "react/jsx-filename-extension",
406
409
  "react/no-danger",
407
410
  "react/no-unknown-property",
411
+ "react/only-export-components",
408
412
  "@typescript-eslint/explicit-module-boundary-types",
409
413
  "@typescript-eslint/explicit-function-return-type",
410
414
  "@typescript-eslint/no-dynamic-delete",
@@ -447,6 +451,19 @@ const restrictionRules = [
447
451
  "import-x/no-webpack-loader-syntax",
448
452
  "import-x/unambiguous"
449
453
  ];
454
+ const nurseryRules = [
455
+ "constructor-super",
456
+ "getter-return",
457
+ "no-misleading-character-class",
458
+ "no-undef",
459
+ "no-unreachable",
460
+ "import/export",
461
+ "import/named",
462
+ "promise/no-return-in-finally",
463
+ "react/require-render-return",
464
+ "import-x/export",
465
+ "import-x/named"
466
+ ];
450
467
  const correctnessRules = [
451
468
  "for-direction",
452
469
  "no-unassigned-vars",
@@ -647,18 +664,6 @@ const correctnessRules = [
647
664
  "vitest/valid-describe-callback",
648
665
  "vitest/valid-expect"
649
666
  ];
650
- const nurseryRules = [
651
- "getter-return",
652
- "no-misleading-character-class",
653
- "no-undef",
654
- "no-unreachable",
655
- "import/export",
656
- "import/named",
657
- "promise/no-return-in-finally",
658
- "react/require-render-return",
659
- "import-x/export",
660
- "import-x/named"
661
- ];
662
667
  const perfRules = [
663
668
  "no-await-in-loop",
664
669
  "no-useless-call",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxlint/migrate",
3
- "version": "1.22.0",
3
+ "version": "1.24.0",
4
4
  "description": "Generates a `.oxlintrc.json` from a existing eslint flat config",
5
5
  "type": "module",
6
6
  "bin": {
@@ -67,7 +67,7 @@
67
67
  "jiti": "^2.4.2",
68
68
  "lint-staged": "^16.1.2",
69
69
  "next": "^15.5.0",
70
- "oxlint": "^1.22.0",
70
+ "oxlint": "^1.24.0",
71
71
  "oxlint-tsgolint": "^0.2.0",
72
72
  "prettier": "^3.6.1",
73
73
  "typescript": "^5.8.3",
@@ -82,11 +82,11 @@
82
82
  "dependencies": {
83
83
  "commander": "^14.0.0",
84
84
  "globals": "^16.3.0",
85
- "oxc-parser": "^0.93.0",
85
+ "oxc-parser": "^0.95.0",
86
86
  "tinyglobby": "^0.2.14"
87
87
  },
88
88
  "peerDependencies": {
89
89
  "jiti": "*"
90
90
  },
91
- "packageManager": "pnpm@10.18.0"
91
+ "packageManager": "pnpm@10.18.3"
92
92
  }