@oxlint/migrate 1.69.0 → 1.71.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,2 +1,2 @@
1
- import { t as main } from "../src-OzarEdss.mjs";
1
+ import { t as main } from "../src-CLLHiI8g.mjs";
2
2
  export { main as default };
@@ -73,7 +73,10 @@ const removeGlobalsWithAreCoveredByEnv = (config) => {
73
73
  };
74
74
  const transformBoolGlobalToString = (config) => {
75
75
  if (config.globals === void 0 || config.globals === null) return;
76
- for (const [entry, value] of Object.entries(config.globals)) config.globals[entry] = transformEslintGlobalAccessToOxlintGlobalValue(value);
76
+ for (const [entry, value] of Object.entries(config.globals)) {
77
+ if (typeof value === "string") continue;
78
+ config.globals[entry] = value ? "writable" : "readonly";
79
+ }
77
80
  };
78
81
  const transformEslintGlobalAccessToOxlintGlobalValue = (global) => {
79
82
  if (global === false || global === "readable" || global === "readonly") return "readonly";
@@ -231,7 +234,7 @@ const typescriptRulesExtendEslintRules = [
231
234
  ];
232
235
  //#endregion
233
236
  //#region src/jsPlugins.ts
234
- const ignorePlugins = new Set([
237
+ const ignorePlugins = /* @__PURE__ */ new Set([
235
238
  ...Object.keys(rulesPrefixesForPlugins),
236
239
  ...Object.values(rulesPrefixesForPlugins),
237
240
  "local"
@@ -516,9 +519,11 @@ const pedanticRules = [
516
519
  "unicorn/prefer-math-min-max",
517
520
  "unicorn/prefer-math-trunc",
518
521
  "unicorn/prefer-native-coercion-functions",
522
+ "unicorn/prefer-number-coercion",
519
523
  "unicorn/prefer-prototype-methods",
520
524
  "unicorn/prefer-query-selector",
521
525
  "unicorn/prefer-regexp-test",
526
+ "unicorn/prefer-single-call",
522
527
  "unicorn/prefer-string-replace-all",
523
528
  "unicorn/prefer-string-slice",
524
529
  "unicorn/prefer-top-level-await",
@@ -647,6 +652,8 @@ const styleRules = [
647
652
  "node/callback-return",
648
653
  "node/global-require",
649
654
  "node/no-exports-assign",
655
+ "node/no-mixed-requires",
656
+ "node/no-sync",
650
657
  "promise/avoid-new",
651
658
  "promise/no-nesting",
652
659
  "promise/no-return-wrap",
@@ -700,6 +707,7 @@ const styleRules = [
700
707
  "unicorn/empty-brace-spaces",
701
708
  "unicorn/error-message",
702
709
  "unicorn/filename-case",
710
+ "unicorn/max-nested-calls",
703
711
  "unicorn/no-array-method-this-argument",
704
712
  "unicorn/no-await-expression-member",
705
713
  "unicorn/no-console-spaces",
@@ -716,6 +724,7 @@ const styleRules = [
716
724
  "unicorn/prefer-classlist-toggle",
717
725
  "unicorn/prefer-default-parameters",
718
726
  "unicorn/prefer-dom-node-text-content",
727
+ "unicorn/prefer-export-from",
719
728
  "unicorn/prefer-global-this",
720
729
  "unicorn/prefer-includes",
721
730
  "unicorn/prefer-keyboard-event-key",
@@ -738,6 +747,7 @@ const styleRules = [
738
747
  "unicorn/switch-case-break-position",
739
748
  "unicorn/text-encoding-identifier-case",
740
749
  "unicorn/throw-new-error",
750
+ "vitest/consistent-each-for",
741
751
  "vitest/consistent-test-filename",
742
752
  "vitest/consistent-test-it",
743
753
  "vitest/consistent-vitest-vi",
@@ -795,6 +805,7 @@ const styleRules = [
795
805
  "vue/define-props-destructuring",
796
806
  "vue/next-tick-style",
797
807
  "vue/prop-name-casing",
808
+ "vue/require-default-prop",
798
809
  "vue/require-direct-export",
799
810
  "vue/require-prop-types",
800
811
  "vue/require-typed-ref",
@@ -848,6 +859,7 @@ const suspiciousRules = [
848
859
  "typescript/no-unsafe-type-assertion",
849
860
  "unicorn/consistent-function-scoping",
850
861
  "unicorn/no-accessor-recursion",
862
+ "unicorn/no-array-fill-with-reference-type",
851
863
  "unicorn/no-array-reverse",
852
864
  "unicorn/no-array-sort",
853
865
  "unicorn/no-instanceof-builtins",
@@ -908,6 +920,7 @@ const restrictionRules = [
908
920
  "react/forbid-dom-props",
909
921
  "react/forbid-elements",
910
922
  "react/jsx-filename-extension",
923
+ "react/jsx-no-literals",
911
924
  "react/no-clone-element",
912
925
  "react/no-danger",
913
926
  "react/no-multi-comp",
@@ -1155,7 +1168,6 @@ const correctnessRules = [
1155
1168
  "unicorn/no-useless-spread",
1156
1169
  "unicorn/prefer-set-size",
1157
1170
  "unicorn/prefer-string-starts-ends-with",
1158
- "vitest/consistent-each-for",
1159
1171
  "vitest/expect-expect",
1160
1172
  "vitest/hoisted-apis-on-top",
1161
1173
  "vitest/no-conditional-expect",
@@ -1174,6 +1186,7 @@ const correctnessRules = [
1174
1186
  "vitest/valid-title",
1175
1187
  "vitest/warn-todo",
1176
1188
  "vue/no-arrow-functions-in-watch",
1189
+ "vue/no-async-in-computed-properties",
1177
1190
  "vue/no-computed-properties-in-data",
1178
1191
  "vue/no-deprecated-data-object-declaration",
1179
1192
  "vue/no-deprecated-delete-set",
@@ -1182,6 +1195,7 @@ const correctnessRules = [
1182
1195
  "vue/no-deprecated-model-definition",
1183
1196
  "vue/no-deprecated-props-default-this",
1184
1197
  "vue/no-deprecated-vue-config-keycodes",
1198
+ "vue/no-dupe-keys",
1185
1199
  "vue/no-export-in-script-setup",
1186
1200
  "vue/no-expose-after-await",
1187
1201
  "vue/no-lifecycle-after-await",
@@ -1189,6 +1203,7 @@ const correctnessRules = [
1189
1203
  "vue/no-reserved-keys",
1190
1204
  "vue/no-reserved-props",
1191
1205
  "vue/no-shared-component-data",
1206
+ "vue/no-side-effects-in-computed-properties",
1192
1207
  "vue/no-this-in-before-route-enter",
1193
1208
  "vue/no-watch-after-await",
1194
1209
  "vue/prefer-import-from-vue",
@@ -1227,6 +1242,7 @@ const nurseryRules = [
1227
1242
  "import/export",
1228
1243
  "import/named",
1229
1244
  "promise/no-return-in-finally",
1245
+ "react/react-compiler",
1230
1246
  "react/require-render-return",
1231
1247
  "typescript/no-unnecessary-condition",
1232
1248
  "typescript/prefer-optional-chain",
@@ -1501,6 +1517,7 @@ var unsupportedRules = {
1501
1517
  "eslint/yield-star-spacing": "Deprecated stylistic rule, can be used via the stylistic eslint plugin as a JS Plugin if necessary.",
1502
1518
  "react/jsx-uses-vars": "Handled by `eslint/no-unused-vars`, which already evaluates whether vars are used in JSX.",
1503
1519
  "unicorn/no-named-default": "Implemented via `import/no-named-default`.",
1520
+ "unicorn/no-double-comparison": "Use `oxc/double-comparisons` instead.",
1504
1521
  "vue/no-lone-template": "Not currently possible, as it requires Vue template parsing.",
1505
1522
  "vue/no-v-html": "Not currently possible, as it requires Vue template parsing.",
1506
1523
  "vue/this-in-template": "Not currently possible, as it requires Vue template parsing.",
@@ -1700,7 +1717,7 @@ function buildUnsupportedRuleExplanations() {
1700
1717
  //#region src/plugins_rules.ts
1701
1718
  const allRules = Object.values(rules_exports).flat();
1702
1719
  const unsupportedRuleExplanations = buildUnsupportedRuleExplanations();
1703
- const oxfmtImportSortingRules = new Set(["sort-imports", "perfectionist/sort-imports"]);
1720
+ const oxfmtImportSortingRules = /* @__PURE__ */ new Set(["sort-imports", "perfectionist/sort-imports"]);
1704
1721
  /**
1705
1722
  * checks if value is validSet, or if validSet is an array, check if value is first value of it
1706
1723
  */
@@ -1745,7 +1762,7 @@ const normalizeSeverityValue = (value) => {
1745
1762
  }
1746
1763
  };
1747
1764
  const equivalentRuleNames = (rule) => {
1748
- const names = new Set([rule, normalizeRuleToCanonical(rule)]);
1765
+ const names = /* @__PURE__ */ new Set([rule, normalizeRuleToCanonical(rule)]);
1749
1766
  if (rule.startsWith("@typescript-eslint/")) {
1750
1767
  const eslintRule = rule.slice(19);
1751
1768
  if (typescriptRulesExtendEslintRules.includes(eslintRule)) names.add(eslintRule);
@@ -1898,8 +1915,8 @@ const mergeOverrideProperties = (target, source) => {
1898
1915
  ...target.rules,
1899
1916
  ...source.rules
1900
1917
  };
1901
- if (source.plugins) target.plugins = [...new Set([...target.plugins ?? [], ...source.plugins])];
1902
- if (source.jsPlugins) target.jsPlugins = [...new Set([...target.jsPlugins ?? [], ...source.jsPlugins])];
1918
+ if (source.plugins) target.plugins = [.../* @__PURE__ */ new Set([...target.plugins ?? [], ...source.plugins])];
1919
+ if (source.jsPlugins) target.jsPlugins = [.../* @__PURE__ */ new Set([...target.jsPlugins ?? [], ...source.jsPlugins])];
1903
1920
  if (source.env) target.env = {
1904
1921
  ...target.env,
1905
1922
  ...source.env
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxlint/migrate",
3
- "version": "1.69.0",
3
+ "version": "1.71.0",
4
4
  "description": "Generates a `.oxlintrc.json` from a existing eslint flat config",
5
5
  "keywords": [
6
6
  "eslint",
@@ -38,16 +38,16 @@
38
38
  "manual-test": "pnpm build; chmod +x dist/bin/oxlint-migrate.mjs; npx ."
39
39
  },
40
40
  "dependencies": {
41
- "commander": "^14.0.0",
41
+ "commander": "^15.0.0",
42
42
  "globals": "^17.0.0",
43
- "oxc-parser": "^0.134.0",
43
+ "oxc-parser": "^0.137.0",
44
44
  "tinyglobby": "^0.2.14"
45
45
  },
46
46
  "devDependencies": {
47
- "@antfu/eslint-config": "^8.0.0",
47
+ "@antfu/eslint-config": "^9.0.0",
48
48
  "@babel/eslint-plugin": "^7.27.1",
49
49
  "@e18e/eslint-plugin": "^0.5.0",
50
- "@eslint-react/eslint-plugin": "^4.0.0",
50
+ "@eslint-react/eslint-plugin": "^5.0.0",
51
51
  "@eslint/js": "^10.0.0",
52
52
  "@logux/eslint-config": "^57.0.0",
53
53
  "@oxc-node/core": "^0.1.0",
@@ -66,7 +66,7 @@
66
66
  "eslint-plugin-header": "^3.1.1",
67
67
  "eslint-plugin-import": "^2.32.0",
68
68
  "eslint-plugin-import-x": "^4.16.0",
69
- "eslint-plugin-jsdoc": "^62.0.0",
69
+ "eslint-plugin-jsdoc": "^63.0.0",
70
70
  "eslint-plugin-jsx-a11y": "^6.10.2",
71
71
  "eslint-plugin-local": "^6.0.0",
72
72
  "eslint-plugin-mocha": "^11.2.0",
@@ -76,15 +76,15 @@
76
76
  "eslint-plugin-react-hooks": "^7.0.1",
77
77
  "eslint-plugin-react-perf": "^3.3.3",
78
78
  "eslint-plugin-react-refresh": "^0.5.0",
79
- "eslint-plugin-react-web-api": "^4.0.0",
79
+ "eslint-plugin-react-web-api": "^5.0.0",
80
80
  "eslint-plugin-regexp": "^3.0.0",
81
81
  "eslint-plugin-tsdoc": "^0.5.0",
82
- "eslint-plugin-unicorn": "^64.0.0",
82
+ "eslint-plugin-unicorn": "^65.0.0",
83
83
  "husky": "^9.1.7",
84
- "lint-staged": "^16.1.2",
84
+ "lint-staged": "^17.0.0",
85
85
  "next": "^16.0.0",
86
- "oxfmt": "^0.53.0",
87
- "oxlint": "^1.69.0",
86
+ "oxfmt": "^0.55.0",
87
+ "oxlint": "^1.71.0",
88
88
  "oxlint-tsgolint": "^0.23.0",
89
89
  "tsdown": "^0.22.0",
90
90
  "typescript": "^6.0.0",
@@ -94,5 +94,5 @@
94
94
  "lint-staged": {
95
95
  "*": "oxfmt --no-error-on-unmatched-pattern"
96
96
  },
97
- "packageManager": "pnpm@11.5.1"
97
+ "packageManager": "pnpm@11.8.0"
98
98
  }