Skip to content

refactor(cli): rename oxlint to oxc#977

Open
zcyc wants to merge 5 commits intoAmanVarshney01:mainfrom
zcyc:main
Open

refactor(cli): rename oxlint to oxc#977
zcyc wants to merge 5 commits intoAmanVarshney01:mainfrom
zcyc:main

Conversation

@zcyc
Copy link
Copy Markdown

@zcyc zcyc commented Mar 18, 2026

Oxc = Oxlint + Oxfmt

Summary by CodeRabbit

  • Chores

    • Renamed the Oxlint addon to Oxc across the CLI, project templates, generators, schemas, and setup flows so selections and tooling now use "oxc", and linting integrations prefer oxc when available.
  • Documentation

    • Updated README, CLI help, website docs, prompts, and generated READMEs to reflect the Oxc addon name and examples.
  • Tests

    • Updated test fixtures and expectations to use the Oxc addon name.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 18, 2026

@zcyc is attempting to deploy a commit to the Better T Stack Team on Vercel.

A member of the Team first needs to authorize it.

@zcyc zcyc changed the title refactor(cli): rename oxlint to oxc across the codebase and update do… refactor(cli): rename oxlint to oxc across the codebase Mar 18, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 18, 2026

Walkthrough

Renames the addon identifier "oxlint" to "oxc" across docs, CLI, templates, types, setup functions, constants, and tests; updates function names, type enums, addon wiring, and related tests to use "oxc" with no behavioral changes.

Changes

Cohort / File(s) Summary
Documentation & CLI docs
README.md, apps/cli/README.md, apps/web/content/docs/*
Replaced displayed addon name/option oxlint with oxc; updated CLI --addons help text.
CLI constants & prompts
apps/cli/src/constants.ts, apps/cli/src/prompts/addons.ts
Changed ADDON_COMPATIBILITY key and prompt entries from oxlintoxc.
Addon setup wiring
apps/cli/src/helpers/addons/addons-setup.ts, apps/cli/src/helpers/addons/oxc-setup.ts, apps/cli/src/helpers/addons/ultracite-setup.ts
Renamed setupOxlintsetupOxc; replaced hasOxlint with hasOxc; updated Husky setup signature and linter unions from "oxlint" to "oxc" and adjusted lint-staged/hook mappings.
Post-install & core logic
apps/cli/src/helpers/core/post-installation.ts, apps/web/src/lib/stack-utils.ts
Updated addon checks and command-generation to reference oxc instead of oxlint.
Web frontend constants
apps/web/src/lib/constant.ts
Replaced TECH_OPTIONS entry id/name from oxlint/Oxlint to oxc/Oxc (data-only).
Template generator & templates
packages/template-generator/src/processors/readme-generator.ts, packages/template-generator/src/templates.generated.ts, packages/template-generator/templates/addons/lefthook/lefthook.yml.hbs
Switched template conditionals and generated README/hooks/scripts to check for oxc (commands still reference oxlint/oxfmt where applicable).
Schemas / Types
packages/types/src/schemas.ts
Replaced enum values oxlintoxc in AddonsSchema and UltraciteLinterSchema.
Tests & fixtures
apps/cli/test/*, apps/cli/test/external-commands.test.ts, apps/cli/test/integration.test.ts, apps/cli/test/silent-create-output.test.ts
Updated tests, fixtures, imports, and expectations to use oxc and setupOxc instead of oxlint/setupOxlint.

Possibly related PRs

  • PR 866: Renames and touches the same addon setup symbols (setupOxlint/setupOxc) and related tests.
  • PR 734: Adds oxlint/oxfmt support and modifies templates/constants that overlap with this rename.
  • PR 711: Updates lefthook templates and addon enum entries affecting the same template logic.
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main refactoring work: renaming oxlint to oxc across the codebase, which is the primary change evident throughout all modified files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/cli/README.md (1)

63-63: ⚠️ Potential issue | 🟡 Minor

Inconsistent addon name in CLI help text.

Line 63 still shows oxlint in the addons list while line 44 shows Oxc. Update the CLI usage documentation to use oxc for consistency.

📝 Suggested fix
-  --addons <types...>             Additional addons (pwa, tauri, electrobun, starlight, biome, lefthook, husky, mcp, turborepo, nx, fumadocs, ultracite, oxlint, opentui, wxt, skills, none)
+  --addons <types...>             Additional addons (pwa, tauri, electrobun, starlight, biome, lefthook, husky, mcp, turborepo, nx, fumadocs, ultracite, oxc, opentui, wxt, skills, none)

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 578fe4d7-5af6-4fac-9b63-842f382892da

📥 Commits

Reviewing files that changed from the base of the PR and between 65151ca and e39b363.

📒 Files selected for processing (21)
  • README.md
  • apps/cli/README.md
  • apps/cli/src/constants.ts
  • apps/cli/src/helpers/addons/addons-setup.ts
  • apps/cli/src/helpers/addons/oxc-setup.ts
  • apps/cli/src/helpers/addons/ultracite-setup.ts
  • apps/cli/src/helpers/core/post-installation.ts
  • apps/cli/src/prompts/addons.ts
  • apps/cli/test/addons.test.ts
  • apps/cli/test/external-commands.test.ts
  • apps/cli/test/integration.test.ts
  • apps/cli/test/silent-create-output.test.ts
  • apps/web/content/docs/cli/options.mdx
  • apps/web/content/docs/index.mdx
  • apps/web/content/docs/project-structure.mdx
  • apps/web/src/lib/constant.ts
  • apps/web/src/lib/stack-utils.ts
  • packages/template-generator/src/processors/readme-generator.ts
  • packages/template-generator/src/templates.generated.ts
  • packages/template-generator/templates/addons/lefthook/lefthook.yml.hbs
  • packages/types/src/schemas.ts

import { cliLog, createSpinner } from "../../utils/terminal-output";

type UltraciteLinter = "biome" | "eslint" | "oxlint";
type UltraciteLinter = "biome" | "eslint" | "oxc";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

Does Ultracite CLI accept "oxc" as a --linter option?

💡 Result:

No, Ultracite CLI does not accept "oxc" as a --linter option. The supported linter options are "biome", "eslint", and "oxlint" (part of the Oxc ecosystem). "oxc" refers to the broader Oxc project, but the specific linter is oxlint, used with commands like npx ultracite init --linter oxlint.

Citations:


Revert type change: "oxc" is not a valid Ultracite CLI linter option.

The change from "oxlint" to "oxc" in the UltraciteLinter type is incorrect. Ultracite CLI only accepts "biome", "eslint", and "oxlint" as valid --linter options. "oxc" refers to the broader Oxc project; the specific linter within that ecosystem is "oxlint". This applies to the LINTERS map as well (line 68). Revert both the type and mapping back to "oxlint".

@zcyc zcyc marked this pull request as draft March 18, 2026 13:54
@zcyc zcyc changed the title refactor(cli): rename oxlint to oxc across the codebase refactor(cli): rename oxlint to oxc Mar 19, 2026
@zcyc zcyc marked this pull request as ready for review March 19, 2026 06:22
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
packages/template-generator/src/processors/readme-generator.ts (1)

685-691: Avoid duplicate check script entries when both linters are selected.

If both biome and oxc are present, README scripts will list check twice. Consider emitting a single line with a combined description.

Proposed refactor
-  if (addons.includes("biome")) {
-    scripts += `\n- \`${packageManagerRunCmd} check\`: Run Biome formatting and linting`;
-  }
-
-  if (addons.includes("oxc")) {
-    scripts += `\n- \`${packageManagerRunCmd} check\`: Run Oxlint and Oxfmt`;
-  }
+  const hasBiome = addons.includes("biome");
+  const hasOxc = addons.includes("oxc");
+  if (hasBiome || hasOxc) {
+    const checkDesc =
+      hasBiome && hasOxc
+        ? "Run Biome and Oxc formatting/linting"
+        : hasBiome
+          ? "Run Biome formatting and linting"
+          : "Run Oxlint and Oxfmt";
+    scripts += `\n- \`${packageManagerRunCmd} check\`: ${checkDesc}`;
+  }

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6d12e9d2-f821-4b28-8d1e-6f8ab97eb2e9

📥 Commits

Reviewing files that changed from the base of the PR and between f8e9392 and fd3ce6d.

📒 Files selected for processing (5)
  • apps/cli/README.md
  • apps/cli/src/helpers/core/post-installation.ts
  • apps/web/content/docs/cli/options.mdx
  • packages/template-generator/src/processors/readme-generator.ts
  • packages/template-generator/src/templates.generated.ts
✅ Files skipped from review due to trivial changes (3)
  • apps/web/content/docs/cli/options.mdx
  • apps/cli/src/helpers/core/post-installation.ts
  • apps/cli/README.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/template-generator/src/templates.generated.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant