@oxlint/migrate 1.63.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-
|
|
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.
|
|
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());
|
package/dist/src/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region node_modules/.pnpm/oxlint@1.
|
|
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,6 +33,7 @@ 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";
|
package/dist/src/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as main } from "../src-
|
|
1
|
+
import { t as main } from "../src-DH3JQTaC.mjs";
|
|
2
2
|
export { main as default };
|
|
@@ -569,6 +569,7 @@ const styleRules = [
|
|
|
569
569
|
"prefer-object-has-own",
|
|
570
570
|
"prefer-object-spread",
|
|
571
571
|
"prefer-promise-reject-errors",
|
|
572
|
+
"prefer-regex-literals",
|
|
572
573
|
"prefer-rest-params",
|
|
573
574
|
"prefer-spread",
|
|
574
575
|
"prefer-template",
|
|
@@ -1038,6 +1039,7 @@ const correctnessRules = [
|
|
|
1038
1039
|
"jsx-a11y/no-aria-hidden-on-focusable",
|
|
1039
1040
|
"jsx-a11y/no-autofocus",
|
|
1040
1041
|
"jsx-a11y/no-distracting-elements",
|
|
1042
|
+
"jsx-a11y/no-noninteractive-element-to-interactive-role",
|
|
1041
1043
|
"jsx-a11y/no-noninteractive-tabindex",
|
|
1042
1044
|
"jsx-a11y/no-redundant-roles",
|
|
1043
1045
|
"jsx-a11y/no-static-element-interactions",
|
|
@@ -1699,9 +1701,21 @@ const normalizeSeverityValue = (value) => {
|
|
|
1699
1701
|
return "off";
|
|
1700
1702
|
}
|
|
1701
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
|
+
};
|
|
1702
1712
|
const removePreviousOverrideRule = (rule, eslintConfig, overrides) => {
|
|
1703
1713
|
if (eslintConfig.files === void 0 && overrides) {
|
|
1704
|
-
|
|
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
|
+
}
|
|
1705
1719
|
}
|
|
1706
1720
|
};
|
|
1707
1721
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxlint/migrate",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.64.0",
|
|
4
4
|
"description": "Generates a `.oxlintrc.json` from a existing eslint flat config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"commander": "^14.0.0",
|
|
42
42
|
"globals": "^17.0.0",
|
|
43
|
-
"oxc-parser": "^0.
|
|
43
|
+
"oxc-parser": "^0.130.0",
|
|
44
44
|
"tinyglobby": "^0.2.14"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
@@ -83,10 +83,10 @@
|
|
|
83
83
|
"husky": "^9.1.7",
|
|
84
84
|
"lint-staged": "^16.1.2",
|
|
85
85
|
"next": "^16.0.0",
|
|
86
|
-
"oxfmt": "^0.
|
|
87
|
-
"oxlint": "^1.
|
|
86
|
+
"oxfmt": "^0.48.0",
|
|
87
|
+
"oxlint": "^1.64.0",
|
|
88
88
|
"oxlint-tsgolint": "^0.22.0",
|
|
89
|
-
"tsdown": "^0.
|
|
89
|
+
"tsdown": "^0.22.0",
|
|
90
90
|
"typescript": "^6.0.0",
|
|
91
91
|
"typescript-eslint": "^8.35.0",
|
|
92
92
|
"vitest": "^4.0.0"
|
|
@@ -94,5 +94,5 @@
|
|
|
94
94
|
"lint-staged": {
|
|
95
95
|
"*": "oxfmt --no-error-on-unmatched-pattern"
|
|
96
96
|
},
|
|
97
|
-
"packageManager": "pnpm@10.33.
|
|
97
|
+
"packageManager": "pnpm@10.33.4"
|
|
98
98
|
}
|