biome-to-oxc 1.3.2 → 1.3.6

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 { i as readJsonFile, n as DefaultReporter, r as findClosestPackageJson, t as migrate } from "../src-BfsedzGC.mjs";
2
+ import { i as readJsonFile, n as DefaultReporter, r as findClosestPackageJson, t as migrate } from "../src-BFaNJFyE.mjs";
3
3
  import { realpath } from "node:fs/promises";
4
4
  import { dirname } from "node:path";
5
5
  import { fileURLToPath } from "node:url";
@@ -1,2 +1,2 @@
1
- import { t as migrate } from "../src-BfsedzGC.mjs";
1
+ import { t as migrate } from "../src-BFaNJFyE.mjs";
2
2
  export { migrate };
@@ -631,7 +631,7 @@ function applyExplicitFormatterOptionPassThrough$1(sources, oxfmtConfig) {
631
631
  }
632
632
  //#endregion
633
633
  //#region src/js-plugin-scaffolder.ts
634
- const RESERVED_JS_PLUGIN_NAMES = new Set([
634
+ const RESERVED_JS_PLUGIN_NAMES = /* @__PURE__ */ new Set([
635
635
  "react",
636
636
  "unicorn",
637
637
  "typescript",
@@ -825,6 +825,7 @@ const BIOME_TO_OXLINT_RULE_MAP = {
825
825
  noIrregularWhitespace: "no-irregular-whitespace",
826
826
  noInteractiveElementToNoninteractiveRole: "jsx-a11y/no-interactive-element-to-noninteractive-role",
827
827
  noInvalidNewBuiltin: "no-new-native-nonconstructor",
828
+ noJsxLiterals: "react/jsx-no-literals",
828
829
  noJsxNamespace: "react/no-namespace",
829
830
  noLabelWithoutControl: "jsx-a11y/label-has-associated-control",
830
831
  noLabelVar: "no-label-var",
@@ -917,6 +918,7 @@ const BIOME_TO_OXLINT_RULE_MAP = {
917
918
  noVoidElementsWithChildren: "react/void-dom-elements-no-children",
918
919
  noVoidTypeReturn: "typescript/no-invalid-void-type",
919
920
  noVueDataObjectDeclaration: ["vue/no-deprecated-data-object-declaration", "vue/no-shared-component-data"],
921
+ noVueDuplicateKeys: "vue/no-dupe-keys",
920
922
  noVueReservedKeys: "vue/no-reserved-keys",
921
923
  noVueReservedProps: "vue/no-reserved-props",
922
924
  noWith: "no-with",
@@ -1045,13 +1047,24 @@ function normalizeOxlintRuleName(ruleName) {
1045
1047
  }
1046
1048
  function mapBiomeRuleOptionsToOxlintSeverity(biomeName, severity, biomeSeverity) {
1047
1049
  if (biomeName === "useVueNextTickPromise") return typeof severity === "string" ? [severity, "promise"] : severity;
1048
- if (biomeName !== "useConsistentMethodSignatures") return severity;
1050
+ if (typeof severity !== "string") return severity;
1049
1051
  if (typeof biomeSeverity !== "object" || biomeSeverity === null) return severity;
1050
1052
  const { options } = biomeSeverity;
1051
1053
  if (typeof options !== "object" || options === null || Array.isArray(options)) return severity;
1054
+ if (biomeName === "noJsxLiterals") {
1055
+ const { allowedStrings, ignoreProps, noStrings } = options;
1056
+ const oxlintOptions = {};
1057
+ if (Array.isArray(allowedStrings) && allowedStrings.every((value) => typeof value === "string")) oxlintOptions.allowedStrings = allowedStrings;
1058
+ if (typeof ignoreProps === "boolean") oxlintOptions.ignoreProps = ignoreProps;
1059
+ if (typeof noStrings === "boolean") {
1060
+ oxlintOptions.noStrings = noStrings;
1061
+ oxlintOptions.noAttributeStrings = noStrings;
1062
+ }
1063
+ return Object.keys(oxlintOptions).length > 0 ? [severity, oxlintOptions] : severity;
1064
+ }
1065
+ if (biomeName !== "useConsistentMethodSignatures") return severity;
1052
1066
  const { style } = options;
1053
1067
  if (style !== "method" && style !== "property") return severity;
1054
- if (typeof severity !== "string") return severity;
1055
1068
  return [severity, style];
1056
1069
  }
1057
1070
  function mapBiomeRuleSeverity(severity, reporter, biomeRuleName) {
@@ -2166,7 +2179,7 @@ async function detectWorkspaceMonorepo(projectDir) {
2166
2179
  }
2167
2180
  }
2168
2181
  async function cleanupLegacyBiomeFiles(outputDir, primaryBiomeConfigPath, dryRun, reporter, signal) {
2169
- const candidates = new Set([primaryBiomeConfigPath, resolve(outputDir, ".biomeignore")]);
2182
+ const candidates = /* @__PURE__ */ new Set([primaryBiomeConfigPath, resolve(outputDir, ".biomeignore")]);
2170
2183
  for (const configName of LEGACY_BIOME_CONFIG_NAMES) candidates.add(resolve(outputDir, configName));
2171
2184
  const touchedPaths = [];
2172
2185
  for (const candidatePath of candidates) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biome-to-oxc",
3
- "version": "1.3.2",
3
+ "version": "1.3.6",
4
4
  "description": "Migrate from Biome to Oxc ecosystem (oxlint + oxfmt + oxlint-tsgolint)",
5
5
  "keywords": [
6
6
  "biome",
@@ -39,18 +39,19 @@
39
39
  "zod": "^4.4.3"
40
40
  },
41
41
  "devDependencies": {
42
- "@types/node": "^25.9.2",
43
- "@vitest/coverage-v8": "^4.1.8",
44
- "oxfmt": "^0.54.0",
45
- "oxlint": "^1.69.0",
42
+ "@types/node": "^26.0.0",
43
+ "@typescript/native-preview": "latest",
44
+ "@vitest/coverage-v8": "^4.1.9",
45
+ "oxfmt": "^0.55.0",
46
+ "oxlint": "^1.70.0",
46
47
  "oxlint-tsgolint": "^0.23.0",
47
- "tsdown": "^0.22.2",
48
- "typescript": "^6.0.3",
49
- "vitest": "^4.1.8"
48
+ "tsdown": "^0.22.3",
49
+ "typescript": "7.0.1-rc",
50
+ "vitest": "^4.1.9"
50
51
  },
51
52
  "engines": {
52
53
  "node": ">=22.22.3",
53
- "pnpm": ">=11.5.2"
54
+ "pnpm": ">=11.8.0"
54
55
  },
55
56
  "scripts": {
56
57
  "test": "vitest",