@oxlint/migrate 1.50.0 → 1.51.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
- import { c as cleanUpOxlintConfig, d as transformRuleEntry, g as transformEnvAndGlobals, h as detectEnvironmentByGlobals, i as fixForJsPlugins, l as detectNeededRulesPlugins, n as warnSettingsInOverride, o as detectSameOverride, r as processConfigFiles, s as transformIgnorePatterns, t as transformSettings } from "../settings-D8R7axmT.mjs";
1
+ import { _ as transformEnvAndGlobals, c as cleanUpOxlintConfig, d as transformRuleEntry, g as detectEnvironmentByGlobals, h as typeAwareRules, i as fixForJsPlugins, l as detectNeededRulesPlugins, n as warnSettingsInOverride, o as detectSameOverride, r as processConfigFiles, s as transformIgnorePatterns, t as transformSettings } from "../settings-R7dCJ7Y3.mjs";
2
2
 
3
3
  //#region src/index.ts
4
4
  const buildConfig = (configs, oxlintConfig, options) => {
@@ -22,6 +22,8 @@ const buildConfig = (configs, oxlintConfig, options) => {
22
22
  oxlintConfig.env.builtin = true;
23
23
  }
24
24
  const overrides = options?.merge ? oxlintConfig.overrides ?? [] : [];
25
+ const globalPlugins = {};
26
+ for (const config of configs) if (config.plugins) Object.assign(globalPlugins, config.plugins);
25
27
  for (const config of configs) {
26
28
  if (config.name?.startsWith("oxlint/")) continue;
27
29
  let targetConfig;
@@ -34,7 +36,7 @@ const buildConfig = (configs, oxlintConfig, options) => {
34
36
  if (push) overrides.push(result);
35
37
  }
36
38
  transformIgnorePatterns(config, targetConfig, options);
37
- transformRuleEntry(config, targetConfig, config.files !== void 0 ? oxlintConfig : void 0, options, config.files === void 0 ? overrides : void 0);
39
+ transformRuleEntry(config, targetConfig, config.files !== void 0 ? oxlintConfig : void 0, options, config.files === void 0 ? overrides : void 0, globalPlugins);
38
40
  transformEnvAndGlobals(config, targetConfig, options);
39
41
  if (config.files === void 0) transformSettings(config, oxlintConfig, options);
40
42
  else warnSettingsInOverride(config, options);
@@ -48,6 +50,12 @@ const buildConfig = (configs, oxlintConfig, options) => {
48
50
  detectNeededRulesPlugins(oxlintConfig);
49
51
  detectEnvironmentByGlobals(oxlintConfig);
50
52
  cleanUpOxlintConfig(oxlintConfig);
53
+ if (options?.typeAware) {
54
+ if ([...Object.keys(oxlintConfig.rules ?? {}), ...(oxlintConfig.overrides ?? []).flatMap((o) => Object.keys(o.rules ?? {}))].some((rule) => typeAwareRules.includes(rule))) oxlintConfig.options = {
55
+ ...oxlintConfig.options,
56
+ typeAware: true
57
+ };
58
+ }
51
59
  return oxlintConfig;
52
60
  };
53
61
  const main = async (configs, oxlintConfig, options) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxlint/migrate",
3
- "version": "1.50.0",
3
+ "version": "1.51.0",
4
4
  "description": "Generates a `.oxlintrc.json` from a existing eslint flat config",
5
5
  "keywords": [
6
6
  "eslint",
@@ -41,23 +41,26 @@
41
41
  "dependencies": {
42
42
  "commander": "^14.0.0",
43
43
  "globals": "^17.0.0",
44
- "oxc-parser": "^0.114.0",
44
+ "oxc-parser": "^0.115.0",
45
45
  "tinyglobby": "^0.2.14"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@antfu/eslint-config": "^7.0.0",
49
+ "@e18e/eslint-plugin": "^0.2.0",
49
50
  "@eslint-react/eslint-plugin": "^2.13.0",
50
- "@eslint/js": "^9.29.0",
51
+ "@eslint/js": "^10.0.0",
51
52
  "@logux/eslint-config": "^57.0.0",
52
53
  "@oxc-node/core": "^0.0.35",
53
54
  "@stylistic/eslint-plugin": "^5.0.0",
54
55
  "@stylistic/eslint-plugin-ts": "^4.4.1",
56
+ "@tanstack/eslint-plugin-query": "^5.91.4",
57
+ "@tanstack/eslint-plugin-router": "^1.161.4",
55
58
  "@types/eslint-config-prettier": "^6.11.3",
56
59
  "@types/node": "^25.0.0",
57
60
  "@typescript-eslint/eslint-plugin": "^8.35.0",
58
61
  "@typescript-eslint/parser": "^8.35.0",
59
62
  "@vitest/coverage-v8": "^4.0.0",
60
- "eslint": "^9.29.0",
63
+ "eslint": "^10.0.0",
61
64
  "eslint-config-next": "^16.0.0",
62
65
  "eslint-config-prettier": "^10.1.5",
63
66
  "eslint-plugin-header": "^3.1.1",
@@ -76,13 +79,13 @@
76
79
  "eslint-plugin-react-web-api": "^2.13.0",
77
80
  "eslint-plugin-regexp": "^3.0.0",
78
81
  "eslint-plugin-tsdoc": "^0.5.0",
79
- "eslint-plugin-unicorn": "^62.0.0",
82
+ "eslint-plugin-unicorn": "^63.0.0",
80
83
  "husky": "^9.1.7",
81
84
  "lint-staged": "^16.1.2",
82
85
  "next": "^16.0.0",
83
- "oxfmt": "^0.34.0",
84
- "oxlint": "^1.50.0",
85
- "oxlint-tsgolint": "^0.14.0",
86
+ "oxfmt": "^0.35.0",
87
+ "oxlint": "^1.51.0",
88
+ "oxlint-tsgolint": "^0.15.0",
86
89
  "tsdown": "^0.20.0",
87
90
  "typescript-eslint": "^8.35.0",
88
91
  "vitest": "^4.0.0"
@@ -90,5 +93,5 @@
90
93
  "lint-staged": {
91
94
  "*": "oxfmt --no-error-on-unmatched-pattern"
92
95
  },
93
- "packageManager": "pnpm@10.30.0"
96
+ "packageManager": "pnpm@10.30.3"
94
97
  }