@oxlint/migrate 1.23.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.
package/dist/package.json.mjs
CHANGED
package/dist/src/env_globals.mjs
CHANGED
|
@@ -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: " +
|
|
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
|
|
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
|
|
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
|
|
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",
|
|
@@ -402,6 +403,7 @@ const restrictionRules = [
|
|
|
402
403
|
"promise/catch-or-return",
|
|
403
404
|
"promise/spec-only",
|
|
404
405
|
"react/button-has-type",
|
|
406
|
+
"react/forbid-dom-props",
|
|
405
407
|
"react/forbid-elements",
|
|
406
408
|
"react/jsx-filename-extension",
|
|
407
409
|
"react/no-danger",
|
|
@@ -449,6 +451,19 @@ const restrictionRules = [
|
|
|
449
451
|
"import-x/no-webpack-loader-syntax",
|
|
450
452
|
"import-x/unambiguous"
|
|
451
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
|
+
];
|
|
452
467
|
const correctnessRules = [
|
|
453
468
|
"for-direction",
|
|
454
469
|
"no-unassigned-vars",
|
|
@@ -649,18 +664,6 @@ const correctnessRules = [
|
|
|
649
664
|
"vitest/valid-describe-callback",
|
|
650
665
|
"vitest/valid-expect"
|
|
651
666
|
];
|
|
652
|
-
const nurseryRules = [
|
|
653
|
-
"getter-return",
|
|
654
|
-
"no-misleading-character-class",
|
|
655
|
-
"no-undef",
|
|
656
|
-
"no-unreachable",
|
|
657
|
-
"import/export",
|
|
658
|
-
"import/named",
|
|
659
|
-
"promise/no-return-in-finally",
|
|
660
|
-
"react/require-render-return",
|
|
661
|
-
"import-x/export",
|
|
662
|
-
"import-x/named"
|
|
663
|
-
];
|
|
664
667
|
const perfRules = [
|
|
665
668
|
"no-await-in-loop",
|
|
666
669
|
"no-useless-call",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxlint/migrate",
|
|
3
|
-
"version": "1.
|
|
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.
|
|
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.
|
|
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.
|
|
91
|
+
"packageManager": "pnpm@10.18.3"
|
|
92
92
|
}
|