@oxlint/migrate 1.12.0 → 1.13.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.12.0";
1
+ const version = "1.13.0";
2
2
  const packageJson = {
3
3
  version
4
4
  };
@@ -172,6 +172,7 @@ const styleRules = [
172
172
  "jest/no-test-prefixes",
173
173
  "jest/no-test-return-statement",
174
174
  "jest/no-untyped-mock-factory",
175
+ "jest/padding-around-test-blocks",
175
176
  "jest/prefer-each",
176
177
  "jest/prefer-called-with",
177
178
  "jest/prefer-comparison-matcher",
@@ -201,6 +202,7 @@ const styleRules = [
201
202
  "react/jsx-fragments",
202
203
  "react/jsx-boolean-value",
203
204
  "react/jsx-curly-brace-presence",
205
+ "react/jsx-handler-names",
204
206
  "react/no-set-state",
205
207
  "react/prefer-es6-class",
206
208
  "react/self-closing-comp",
@@ -310,6 +312,7 @@ const suspiciousRules = [
310
312
  "import/no-named-as-default-member",
311
313
  "import/no-self-import",
312
314
  "jest/no-commented-out-tests",
315
+ "promise/always-return",
313
316
  "promise/no-promise-in-callback",
314
317
  "react/iframe-missing-sandbox",
315
318
  "react/jsx-no-comment-textnodes",
@@ -3,6 +3,7 @@ import { cleanUpOxlintConfig } from "./cleanup.mjs";
3
3
  import { transformIgnorePatterns } from "./ignorePatterns.mjs";
4
4
  import { transformRuleEntry, detectNeededRulesPlugins } from "./plugins_rules.mjs";
5
5
  import { detectSameOverride } from "./overrides.mjs";
6
+ import fixForJsPlugins from "./js_plugin_fixes.mjs";
6
7
  const buildConfig = (configs, oxlintConfig, options) => {
7
8
  if (oxlintConfig === void 0) {
8
9
  if (options?.merge) {
@@ -70,8 +71,9 @@ const buildConfig = (configs, oxlintConfig, options) => {
70
71
  return oxlintConfig;
71
72
  };
72
73
  const main = async (configs, oxlintConfig, options) => {
73
- const resolved = await Promise.resolve(configs);
74
- return Array.isArray(resolved) ? buildConfig(resolved, oxlintConfig, options) : buildConfig([resolved], oxlintConfig, options);
74
+ const resolved = await Promise.resolve(fixForJsPlugins(configs));
75
+ const resolvedConfigs = Array.isArray(resolved) ? resolved : [resolved];
76
+ return buildConfig(resolvedConfigs, oxlintConfig, options);
75
77
  };
76
78
  export {
77
79
  main as default
@@ -0,0 +1,4 @@
1
+ import { Linter } from 'eslint';
2
+ type PossibleConfigs = Linter.Config | Linter.Config[] | Promise<Linter.Config> | Promise<Linter.Config[]>;
3
+ export default function fixForJsPlugins(configs: PossibleConfigs): PossibleConfigs;
4
+ export {};
@@ -0,0 +1,16 @@
1
+ const fixForAntfuEslintConfig = (config) => {
2
+ if ("renamePlugins" in config && typeof config.renamePlugins === "function") {
3
+ return config.renamePlugins({
4
+ ts: "@typescript-eslint",
5
+ test: "vitest",
6
+ next: "@next/next"
7
+ });
8
+ }
9
+ return config;
10
+ };
11
+ function fixForJsPlugins(configs) {
12
+ return fixForAntfuEslintConfig(configs);
13
+ }
14
+ export {
15
+ fixForJsPlugins as default
16
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxlint/migrate",
3
- "version": "1.12.0",
3
+ "version": "1.13.0",
4
4
  "description": "Generates a `.oxlintrc.json` from a existing eslint flat config",
5
5
  "type": "module",
6
6
  "bin": {
@@ -54,7 +54,7 @@
54
54
  "eslint-plugin-header": "^3.1.1",
55
55
  "eslint-plugin-import": "^2.32.0",
56
56
  "eslint-plugin-import-x": "^4.16.0",
57
- "eslint-plugin-jsdoc": "^52.0.0",
57
+ "eslint-plugin-jsdoc": "^54.0.0",
58
58
  "eslint-plugin-local": "^6.0.0",
59
59
  "eslint-plugin-oxlint": "^1.3.0",
60
60
  "eslint-plugin-react": "^7.37.5",
@@ -65,7 +65,7 @@
65
65
  "husky": "^9.1.7",
66
66
  "jiti": "^2.4.2",
67
67
  "lint-staged": "^16.1.2",
68
- "oxlint": "^1.12.0",
68
+ "oxlint": "^1.13.0",
69
69
  "prettier": "^3.6.1",
70
70
  "typescript": "^5.8.3",
71
71
  "typescript-eslint": "^8.35.0",
@@ -78,12 +78,12 @@
78
78
  },
79
79
  "dependencies": {
80
80
  "commander": "^14.0.0",
81
- "oxc-parser": "^0.81.0",
81
+ "oxc-parser": "^0.82.0",
82
82
  "tinyglobby": "^0.2.14"
83
83
  },
84
84
  "peerDependencies": {
85
85
  "globals": "^14.0.0 || ^15.0.0 || ^16.0.0",
86
86
  "jiti": "*"
87
87
  },
88
- "packageManager": "pnpm@10.14.0"
88
+ "packageManager": "pnpm@10.15.0"
89
89
  }