feat(create): add OXC toolchain (oxlint + oxfmt)#439
feat(create): add OXC toolchain (oxlint + oxfmt)#439zek01svg wants to merge 1 commit intoTanStack:mainfrom
Conversation
Adds OXC as a third toolchain option alongside ESLint and Biome for both React and Solid frameworks. OXC is a Rust-powered toolchain from the oxc-project that is 10-100x faster than ESLint and 30x faster than Prettier. - oxlint: fast linter (stable v1.x) - oxfmt: Prettier-compatible formatter (beta v0.x, 100% JS/TS conformance) Each framework gets: - info.json with exclusive linter slot, priority 3 (after ESLint=0, Biome=2) - package.json with lint/format/check scripts - .oxlintrc.json config (React variant includes react plugin) - .oxfmtrc.json config - small-logo.svg
📝 WalkthroughWalkthroughIntroduces OXC toolchain (oxlint + oxfmt) support for both React and Solid frameworks, including configuration files, toolchain metadata, and npm scripts for linting and formatting workflows. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
packages/create/src/frameworks/solid/toolchains/oxc/package.json (1)
2-6: Same script semantics concern as React OXC template.
formatcurrently checks, whilecheckwrites/fixes. If not intentionally matching repo convention, consider flipping for clearer behavior.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/create/src/frameworks/solid/toolchains/oxc/package.json` around lines 2 - 6, The package.json scripts for the Solid OXC template have inverted semantics: "format" currently runs a check ("oxfmt --check .") and "check" runs write/fix ("oxfmt --write . && oxlint --fix ."); change them so "format" performs the write/fix (use "oxfmt --write ." and also run any fixer like "oxlint --fix .") and "check" performs readonly verification (use "oxfmt --check ." and "oxlint ." or similar), updating the "format" and "check" entries in package.json scripts accordingly so their behavior matches the repo convention.packages/create/src/frameworks/react/toolchains/oxc/package.json (1)
2-6: Alignformat/checkscripts with Biome toolchain conventions.The Oxc scripts use non-standard semantics where
formatonly validates (oxfmt --check .) whilecheckmutates files (oxfmt --write . && oxlint --fix .). This matches the ESLint toolchain but inverts the Biome convention. For consistency within the project,formatshould mutate andcheckshould validate—matching how Biome works.Proposed adjustment
"scripts": { "lint": "oxlint .", - "format": "oxfmt --check .", - "check": "oxfmt --write . && oxlint --fix ." + "format": "oxfmt --write .", + "check": "oxfmt --check . && oxlint ." },Note: The ESLint toolchain has the same pattern; if you adopt this change, consider applying it there as well for consistency.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/create/src/frameworks/react/toolchains/oxc/package.json` around lines 2 - 6, The package.json scripts invert Biome conventions: change the "format" script to perform mutating formatting/fixes and the "check" script to only validate; specifically update the "format" script to run the mutating commands (use oxfmt --write . && oxlint --fix .) and update the "check" script to run the non-mutating validators (use oxfmt --check . && oxlint .) so the "format" and "check" npm scripts in package.json follow the Biome-style semantics.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@packages/create/src/frameworks/react/toolchains/oxc/package.json`:
- Around line 2-6: The package.json scripts invert Biome conventions: change the
"format" script to perform mutating formatting/fixes and the "check" script to
only validate; specifically update the "format" script to run the mutating
commands (use oxfmt --write . && oxlint --fix .) and update the "check" script
to run the non-mutating validators (use oxfmt --check . && oxlint .) so the
"format" and "check" npm scripts in package.json follow the Biome-style
semantics.
In `@packages/create/src/frameworks/solid/toolchains/oxc/package.json`:
- Around line 2-6: The package.json scripts for the Solid OXC template have
inverted semantics: "format" currently runs a check ("oxfmt --check .") and
"check" runs write/fix ("oxfmt --write . && oxlint --fix ."); change them so
"format" performs the write/fix (use "oxfmt --write ." and also run any fixer
like "oxlint --fix .") and "check" performs readonly verification (use "oxfmt
--check ." and "oxlint ." or similar), updating the "format" and "check" entries
in package.json scripts accordingly so their behavior matches the repo
convention.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: dddc2bda-cc50-4720-9c1b-86861112aeeb
⛔ Files ignored due to path filters (2)
packages/create/src/frameworks/react/toolchains/oxc/small-logo.svgis excluded by!**/*.svgpackages/create/src/frameworks/solid/toolchains/oxc/small-logo.svgis excluded by!**/*.svg
📒 Files selected for processing (9)
.changeset/add-oxc-toolchain.mdpackages/create/src/frameworks/react/toolchains/oxc/assets/_dot_oxfmtrc.jsonpackages/create/src/frameworks/react/toolchains/oxc/assets/_dot_oxlintrc.jsonpackages/create/src/frameworks/react/toolchains/oxc/info.jsonpackages/create/src/frameworks/react/toolchains/oxc/package.jsonpackages/create/src/frameworks/solid/toolchains/oxc/assets/_dot_oxfmtrc.jsonpackages/create/src/frameworks/solid/toolchains/oxc/assets/_dot_oxlintrc.jsonpackages/create/src/frameworks/solid/toolchains/oxc/info.jsonpackages/create/src/frameworks/solid/toolchains/oxc/package.json
Summary
Changes
New files only — no existing code modified. Auto-discovered by
scanAddOnDirectories(no TypeScript registration needed).React
packages/create/src/frameworks/react/toolchains/oxc/Solid
packages/create/src/frameworks/solid/toolchains/oxc/Each contains:
info.json— typetoolchain,exclusive: ["linter"], priority 3 (after ESLint=0, Biome=2)package.json—oxlint ^1.0.0,oxfmt ^0.46.0, withlint/format/checkscriptsassets/.oxlintrc.json— minimal correctness rules; React variant addsreactpluginassets/.oxfmtrc.json— Prettier-compatible formatting configsmall-logo.svg— OXC brand orange (#FF5A1F)Test plan
Notes
file-helper.test.ts,create-app.test.ts) exist onmainand are unrelated to this PR; CI (Linux) passes cleanly🤖 Generated with Claude Code
Summary by CodeRabbit