biome-to-oxc 1.3.1 → 1.3.2

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-DGPakywd.mjs";
2
+ import { i as readJsonFile, n as DefaultReporter, r as findClosestPackageJson, t as migrate } from "../src-BfsedzGC.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-DGPakywd.mjs";
1
+ import { t as migrate } from "../src-BfsedzGC.mjs";
2
2
  export { migrate };
@@ -743,10 +743,10 @@ const BIOME_TO_OXLINT_CATEGORY_MAP = {
743
743
  nursery: "nursery"
744
744
  };
745
745
  const BIOME_TO_OXLINT_RULE_MAP = {
746
- noAccessKey: "jsx_a11y/no-access-key",
746
+ noAccessKey: "jsx-a11y/no-access-key",
747
747
  noArguments: "prefer-rest-params",
748
- noAriaHiddenOnFocusable: "jsx_a11y/no-aria-hidden-on-focusable",
749
- noAriaUnsupportedElements: "jsx_a11y/aria-unsupported-elements",
748
+ noAriaHiddenOnFocusable: "jsx-a11y/no-aria-hidden-on-focusable",
749
+ noAriaUnsupportedElements: "jsx-a11y/aria-unsupported-elements",
750
750
  noAccumulatingSpread: "oxc/no-accumulating-spread",
751
751
  noAlert: "no-alert",
752
752
  noConstantBinaryExpressions: "no-constant-binary-expression",
@@ -755,7 +755,7 @@ const BIOME_TO_OXLINT_RULE_MAP = {
755
755
  noArrayIndexKey: "react/no-array-index-key",
756
756
  noAssignInExpressions: "no-cond-assign",
757
757
  noAsyncPromiseExecutor: "no-async-promise-executor",
758
- noAutofocus: "jsx_a11y/no-autofocus",
758
+ noAutofocus: "jsx-a11y/no-autofocus",
759
759
  noAwaitInLoops: "no-await-in-loop",
760
760
  noBaseToString: "typescript/no-base-to-string",
761
761
  noBeforeInteractiveScriptOutsideDocument: "nextjs/no-before-interactive-script-outside-document",
@@ -780,7 +780,7 @@ const BIOME_TO_OXLINT_RULE_MAP = {
780
780
  noDangerouslySetInnerHtmlWithChildren: "react/no-danger-with-children",
781
781
  noDebugger: "no-debugger",
782
782
  noDefaultExport: "import/no-default-export",
783
- noDistractingElements: "jsx_a11y/no-distracting-elements",
783
+ noDistractingElements: "jsx-a11y/no-distracting-elements",
784
784
  noDoubleEquals: "eqeqeq",
785
785
  noDuplicateCase: "no-duplicate-case",
786
786
  noDuplicateElseIf: "no-dupe-else-if",
@@ -809,7 +809,7 @@ const BIOME_TO_OXLINT_RULE_MAP = {
809
809
  noGlobalAssign: "no-global-assign",
810
810
  noGlobalEval: "no-eval",
811
811
  noGlobalObjectCalls: "no-obj-calls",
812
- noHeaderScope: "jsx_a11y/scope",
812
+ noHeaderScope: "jsx-a11y/scope",
813
813
  noHeadElement: "nextjs/no-head-element",
814
814
  noHeadImportInDocument: "nextjs/no-head-import-in-document",
815
815
  noImportAssign: "no-import-assign",
@@ -823,10 +823,10 @@ const BIOME_TO_OXLINT_RULE_MAP = {
823
823
  noInvalidUseBeforeDeclaration: "no-use-before-define",
824
824
  noInvalidConstructorSuper: "no-this-before-super",
825
825
  noIrregularWhitespace: "no-irregular-whitespace",
826
- noInteractiveElementToNoninteractiveRole: "jsx_a11y/no-interactive-element-to-noninteractive-role",
826
+ noInteractiveElementToNoninteractiveRole: "jsx-a11y/no-interactive-element-to-noninteractive-role",
827
827
  noInvalidNewBuiltin: "no-new-native-nonconstructor",
828
828
  noJsxNamespace: "react/no-namespace",
829
- noLabelWithoutControl: "jsx_a11y/label-has-associated-control",
829
+ noLabelWithoutControl: "jsx-a11y/label-has-associated-control",
830
830
  noLabelVar: "no-label-var",
831
831
  noLoopFunc: "no-loop-func",
832
832
  noMagicNumbers: "no-magic-numbers",
@@ -842,9 +842,9 @@ const BIOME_TO_OXLINT_RULE_MAP = {
842
842
  noNamespaceImport: "import/no-namespace",
843
843
  noNestedComponentDefinitions: "react/no-unstable-nested-components",
844
844
  noNestedTernary: "no-nested-ternary",
845
- noNoninteractiveElementInteractions: "jsx_a11y/no-noninteractive-element-interactions",
846
- noNoninteractiveElementToInteractiveRole: "jsx_a11y/no-noninteractive-element-to-interactive-role",
847
- noNoninteractiveTabindex: "jsx_a11y/no-noninteractive-tabindex",
845
+ noNoninteractiveElementInteractions: "jsx-a11y/no-noninteractive-element-interactions",
846
+ noNoninteractiveElementToInteractiveRole: "jsx-a11y/no-noninteractive-element-to-interactive-role",
847
+ noNoninteractiveTabindex: "jsx-a11y/no-noninteractive-tabindex",
848
848
  noNonNullAssertedOptionalChain: "typescript/no-non-null-asserted-optional-chain",
849
849
  noNonNullAssertion: "typescript/no-non-null-assertion",
850
850
  noNonoctalDecimalEscape: "no-nonoctal-decimal-escape",
@@ -856,8 +856,8 @@ const BIOME_TO_OXLINT_RULE_MAP = {
856
856
  noProto: "no-proto",
857
857
  noPrototypeBuiltins: "no-prototype-builtins",
858
858
  noRedeclare: "no-redeclare",
859
- noRedundantAlt: "jsx_a11y/img-redundant-alt",
860
- noRedundantRoles: "jsx_a11y/no-redundant-roles",
859
+ noRedundantAlt: "jsx-a11y/img-redundant-alt",
860
+ noRedundantRoles: "jsx-a11y/no-redundant-roles",
861
861
  noDuplicateTestHooks: ["jest/no-duplicate-hooks", "vitest/no-duplicate-hooks"],
862
862
  noConditionalExpect: ["jest/no-conditional-expect", "vitest/no-conditional-expect"],
863
863
  noExcessiveNestedTestSuites: ["jest/max-nested-describe", "vitest/max-nested-describe"],
@@ -879,7 +879,7 @@ const BIOME_TO_OXLINT_RULE_MAP = {
879
879
  noStaticOnlyClass: "unicorn/no-static-only-class",
880
880
  noSyncScripts: "nextjs/no-sync-scripts",
881
881
  noSwitchDeclarations: "no-case-declarations",
882
- noStaticElementInteractions: "jsx_a11y/no-static-element-interactions",
882
+ noStaticElementInteractions: "jsx-a11y/no-static-element-interactions",
883
883
  noTemplateCurlyInString: "no-template-curly-in-string",
884
884
  noTernary: "no-ternary",
885
885
  noUndeclaredVariables: "no-undef",
@@ -917,19 +917,21 @@ const BIOME_TO_OXLINT_RULE_MAP = {
917
917
  noVoidElementsWithChildren: "react/void-dom-elements-no-children",
918
918
  noVoidTypeReturn: "typescript/no-invalid-void-type",
919
919
  noVueDataObjectDeclaration: ["vue/no-deprecated-data-object-declaration", "vue/no-shared-component-data"],
920
+ noVueReservedKeys: "vue/no-reserved-keys",
921
+ noVueReservedProps: "vue/no-reserved-props",
920
922
  noWith: "no-with",
921
923
  noYodaExpression: "yoda",
922
- useAltText: "jsx_a11y/alt-text",
923
- useAnchorContent: "jsx_a11y/anchor-has-content",
924
+ useAltText: "jsx-a11y/alt-text",
925
+ useAnchorContent: "jsx-a11y/anchor-has-content",
924
926
  useArrowFunction: "prefer-arrow-callback",
925
927
  useArraySome: "unicorn/prefer-array-some",
926
928
  useArraySortCompare: "typescript/require-array-sort-compare",
927
- useAriaActivedescendantWithTabindex: "jsx_a11y/aria-activedescendant-has-tabindex",
929
+ useAriaActivedescendantWithTabindex: "jsx-a11y/aria-activedescendant-has-tabindex",
928
930
  useAwaitThenable: "typescript/await-thenable",
929
931
  useButtonType: "react/button-has-type",
930
- useAriaPropTypes: "jsx_a11y/aria-proptypes",
931
- useAriaPropsForRole: "jsx_a11y/role-has-required-aria-props",
932
- useAriaPropsSupportedByRole: "jsx_a11y/role-supports-aria-props",
932
+ useAriaPropTypes: "jsx-a11y/aria-proptypes",
933
+ useAriaPropsForRole: "jsx-a11y/role-has-required-aria-props",
934
+ useAriaPropsSupportedByRole: "jsx-a11y/role-supports-aria-props",
933
935
  useAsConstAssertion: "typescript/prefer-as-const",
934
936
  useAtIndex: "unicorn/prefer-at",
935
937
  useAwait: "require-await",
@@ -959,17 +961,17 @@ const BIOME_TO_OXLINT_RULE_MAP = {
959
961
  useFilenamingConvention: "unicorn/filename-case",
960
962
  useFind: "typescript/prefer-find",
961
963
  useFlatMap: "unicorn/prefer-array-flat-map",
962
- useFocusableInteractive: "jsx_a11y/interactive-supports-focus",
964
+ useFocusableInteractive: "jsx-a11y/interactive-supports-focus",
963
965
  useForOf: "typescript/prefer-for-of",
964
966
  useGetterReturn: "getter-return",
965
967
  useGlobalThis: "unicorn/prefer-global-this",
966
968
  useGoogleFontDisplay: "nextjs/google-font-display",
967
969
  useGoogleFontPreconnect: "nextjs/google-font-preconnect",
968
970
  useGuardForIn: "guard-for-in",
969
- useHeadingContent: "jsx_a11y/heading-has-content",
970
- useHtmlLang: "jsx_a11y/html-has-lang",
971
+ useHeadingContent: "jsx-a11y/heading-has-content",
972
+ useHtmlLang: "jsx-a11y/html-has-lang",
971
973
  useHookAtTopLevel: "react/rules-of-hooks",
972
- useIframeTitle: "jsx_a11y/iframe-has-title",
974
+ useIframeTitle: "jsx-a11y/iframe-has-title",
973
975
  useImportsFirst: "import/first",
974
976
  useImportType: "typescript/consistent-type-imports",
975
977
  useIndexOf: "unicorn/prefer-array-index-of",
@@ -977,12 +979,12 @@ const BIOME_TO_OXLINT_RULE_MAP = {
977
979
  useIterableCallbackReturn: "array-callback-return",
978
980
  useIsNan: "use-isnan",
979
981
  useJsxKeyInIterable: "react/jsx-key",
980
- useKeyWithClickEvents: "jsx_a11y/click-events-have-key-events",
981
- useKeyWithMouseEvents: "jsx_a11y/mouse-events-have-key-events",
982
+ useKeyWithClickEvents: "jsx-a11y/click-events-have-key-events",
983
+ useKeyWithMouseEvents: "jsx-a11y/mouse-events-have-key-events",
982
984
  useLiteralEnumMembers: "typescript/prefer-literal-enum-member",
983
985
  useLiteralKeys: "typescript/dot-notation",
984
986
  useMathMinMax: "unicorn/prefer-math-min-max",
985
- useMediaCaption: "jsx_a11y/media-has-caption",
987
+ useMediaCaption: "jsx-a11y/media-has-caption",
986
988
  useNamedCaptureGroup: "prefer-named-capture-group",
987
989
  useNodejsImportProtocol: "unicorn/prefer-node-protocol",
988
990
  useNullishCoalescing: "typescript/prefer-nullish-coalescing",
@@ -996,7 +998,7 @@ const BIOME_TO_OXLINT_RULE_MAP = {
996
998
  useRegexLiterals: "prefer-regex-literals",
997
999
  useRegexpExec: "typescript/prefer-regexp-exec",
998
1000
  useRegexpTest: "unicorn/prefer-regexp-test",
999
- useSemanticElements: "jsx_a11y/prefer-tag-over-role",
1001
+ useSemanticElements: "jsx-a11y/prefer-tag-over-role",
1000
1002
  useShorthandFunctionType: "typescript/prefer-function-type",
1001
1003
  useSimplifiedLogicExpression: "unicorn/prefer-logical-operator-over-ternary",
1002
1004
  useSpread: "prefer-spread",
@@ -1010,16 +1012,17 @@ const BIOME_TO_OXLINT_RULE_MAP = {
1010
1012
  useTrimStartEnd: "unicorn/prefer-string-trim-start-end",
1011
1013
  useUnicodeRegex: "require-unicode-regexp",
1012
1014
  useUnifiedTypeSignatures: "typescript/unified-signatures",
1013
- useValidAriaRole: "jsx_a11y/aria-role",
1014
- useValidAnchor: "jsx_a11y/anchor-is-valid",
1015
- useValidAriaProps: "jsx_a11y/aria-props",
1016
- useValidAriaValues: "jsx_a11y/aria-proptypes",
1017
- useValidAutocomplete: "jsx_a11y/autocomplete-valid",
1015
+ useValidAriaRole: "jsx-a11y/aria-role",
1016
+ useValidAnchor: "jsx-a11y/anchor-is-valid",
1017
+ useValidAriaProps: "jsx-a11y/aria-props",
1018
+ useValidAriaValues: "jsx-a11y/aria-proptypes",
1019
+ useValidAutocomplete: "jsx-a11y/autocomplete-valid",
1018
1020
  useValidForDirection: "for-direction",
1019
- useValidLang: "jsx_a11y/lang",
1021
+ useValidLang: "jsx-a11y/lang",
1020
1022
  useValidTypeof: "valid-typeof",
1021
1023
  useVarsOnTop: "vars-on-top",
1022
1024
  useVueConsistentDefinePropsDeclaration: "vue/define-props-declaration",
1025
+ useVueNextTickPromise: "vue/next-tick-style",
1023
1026
  useYield: "require-yield"
1024
1027
  };
1025
1028
  const WARNED_UNMAPPED_RULES_BY_REPORTER = /* @__PURE__ */ new WeakMap();
@@ -1036,11 +1039,12 @@ const OXLINT_SEVERITY_NORMALIZATION = {
1036
1039
  };
1037
1040
  function normalizeOxlintRuleName(ruleName) {
1038
1041
  if (ruleName.startsWith("react-hooks/")) return ruleName.replace("react-hooks/", "react/");
1039
- if (ruleName.startsWith("jsx-a11y/")) return ruleName.replace("jsx-a11y/", "jsx_a11y/");
1040
- if (ruleName.startsWith("react-perf/")) return ruleName.replace("react-perf/", "react_perf/");
1042
+ if (ruleName.startsWith("jsx_a11y/")) return ruleName.replace("jsx_a11y/", "jsx-a11y/");
1043
+ if (ruleName.startsWith("react_perf/")) return ruleName.replace("react_perf/", "react-perf/");
1041
1044
  return ruleName;
1042
1045
  }
1043
1046
  function mapBiomeRuleOptionsToOxlintSeverity(biomeName, severity, biomeSeverity) {
1047
+ if (biomeName === "useVueNextTickPromise") return typeof severity === "string" ? [severity, "promise"] : severity;
1044
1048
  if (biomeName !== "useConsistentMethodSignatures") return severity;
1045
1049
  if (typeof biomeSeverity !== "object" || biomeSeverity === null) return severity;
1046
1050
  const { options } = biomeSeverity;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biome-to-oxc",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "Migrate from Biome to Oxc ecosystem (oxlint + oxfmt + oxlint-tsgolint)",
5
5
  "keywords": [
6
6
  "biome",
@@ -33,20 +33,20 @@
33
33
  "import": "./dist/src/index.mjs"
34
34
  },
35
35
  "dependencies": {
36
- "commander": "15.0.0-0",
36
+ "commander": "15.0.0",
37
37
  "jsonc-parser": "next",
38
38
  "picocolors": "^1.1.1",
39
39
  "zod": "^4.4.3"
40
40
  },
41
41
  "devDependencies": {
42
- "@types/node": "^25.9.1",
43
- "@vitest/coverage-v8": "^4.1.7",
44
- "oxfmt": "^0.53.0",
45
- "oxlint": "^1.68.0",
42
+ "@types/node": "^25.9.2",
43
+ "@vitest/coverage-v8": "^4.1.8",
44
+ "oxfmt": "^0.54.0",
45
+ "oxlint": "^1.69.0",
46
46
  "oxlint-tsgolint": "^0.23.0",
47
- "tsdown": "^0.22.0",
47
+ "tsdown": "^0.22.2",
48
48
  "typescript": "^6.0.3",
49
- "vitest": "^4.1.7"
49
+ "vitest": "^4.1.8"
50
50
  },
51
51
  "engines": {
52
52
  "node": ">=22.22.3",