chore: migrate from Biome to oxlint#100
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughThe pull request replaces ESLint and BiomeJS with OXlint for linting and Prettier for formatting. Configuration files are updated, dependencies are swapped, the lint script is modified, and minor code adjustments address new linting rule behaviors. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
CLAUDE.md (1)
41-41:⚠️ Potential issue | 🟡 MinorStale reference to
eslintin pre-commit description.Line 24 was updated to reflect oxlint, but line 41 still says pre-commit runs
eslint(JS/TS). After this PR, pre-commit runsoxlint, noteslint.Proposed change
-Pre-commit runs `ruff` (Python), `prettier` (Vue/TS/SCSS), and `eslint` (JS/TS). +Pre-commit runs `ruff` (Python), `prettier` (Vue/TS/SCSS), and `oxlint` (JS/TS/Vue).🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@CLAUDE.md` at line 41, The README contains a stale reference to "eslint" in the pre-commit description; update the sentence that currently reads "Pre-commit runs `ruff` (Python), `prettier` (Vue/TS/SCSS), and `eslint` (JS/TS)." to mention `oxlint` instead of `eslint` so it matches the change on line 24—replace the `eslint` token and any surrounding phrasing that implies ESLint is used (search for the string "eslint" or the sentence starting with "Pre-commit runs") to ensure consistency.
🧹 Nitpick comments (1)
frontend/oxlint.json (1)
8-12: Add build output dir toignorePatterns.The frontend Vite build emits to
../forms_pro/public/frontend/(seefrontend/vite.config.js), notdist/. Those generated files aren't currently excluded from oxlint.Proposed change
"ignorePatterns": [ "dist/**", + "../forms_pro/public/frontend/**", "coverage/**", "node_modules/**" ]🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@frontend/oxlint.json` around lines 8 - 12, Update the "ignorePatterns" array in oxlint.json to include the Vite build output directory used by the frontend (as configured in frontend/vite.config.js) so generated files are excluded from linting; add a glob such as "../forms_pro/public/frontend/**" (or equivalent relative pattern) to the existing ignorePatterns alongside "dist/**", "coverage/**", and "node_modules/**".
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.pre-commit-config.yaml:
- Around line 44-48: The oxlint pre-commit hook is running from the repo root
and cannot discover frontend/oxlint.json; update the oxlint hook block in
.pre-commit-config.yaml (the repo: https://github.com/oxc-project/mirrors-oxlint
entry and its oxlint hook id) to add a files: pattern limiting linting to
frontend sources and pass the explicit config path (e.g., add args: ["--config",
"frontend/oxlint.json"]) so oxlint runs only against the intended files and uses
the frontend/oxlint.json configuration.
In `@docs/superpowers/plans/2026-04-22-biome-to-oxlint.md`:
- Around line 125-131: Update the plan's pre-commit snippet to match the shipped
.pre-commit-config.yaml: replace repo: https://github.com/oxc-project/oxlint and
rev: v0.16.6 with repo: https://github.com/oxc-project/mirrors-oxlint (or short
form oxc-project/mirrors-oxlint) and rev: v1.60.0, preserving the hook id:
oxlint and types_or: [javascript, ts, vue] so the plan reflects the real
configuration readers will copy.
In `@frontend/package.json`:
- Line 10: package.json's lint script references oxlint and the repo pins oxlint
at ^1.61.0 while .pre-commit-config.yaml uses rev: v1.60.0, causing version
drift; pick a single oxlint version and make both places match (either update
package.json's pinned version to v1.60.0 or update .pre-commit-config.yaml rev
to v1.61.0 or the exact semver you prefer) so the "lint" script and the
pre-commit hook run the same linter version—update the package.json dependency
string for oxlint and/or the rev value in .pre-commit-config.yaml accordingly
and run the lint command to verify no regressions.
---
Outside diff comments:
In `@CLAUDE.md`:
- Line 41: The README contains a stale reference to "eslint" in the pre-commit
description; update the sentence that currently reads "Pre-commit runs `ruff`
(Python), `prettier` (Vue/TS/SCSS), and `eslint` (JS/TS)." to mention `oxlint`
instead of `eslint` so it matches the change on line 24—replace the `eslint`
token and any surrounding phrasing that implies ESLint is used (search for the
string "eslint" or the sentence starting with "Pre-commit runs") to ensure
consistency.
---
Nitpick comments:
In `@frontend/oxlint.json`:
- Around line 8-12: Update the "ignorePatterns" array in oxlint.json to include
the Vite build output directory used by the frontend (as configured in
frontend/vite.config.js) so generated files are excluded from linting; add a
glob such as "../forms_pro/public/frontend/**" (or equivalent relative pattern)
to the existing ignorePatterns alongside "dist/**", "coverage/**", and
"node_modules/**".
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 38a2e1a0-0ce2-49ea-9019-c48a048a653a
⛔ Files ignored due to path filters (1)
frontend/yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (9)
.pre-commit-config.yamlCLAUDE.mddocs/superpowers/plans/2026-04-22-biome-to-oxlint.mdfrontend/biome.jsonfrontend/e2e/fixtures/test-data.fixture.tsfrontend/oxlint.jsonfrontend/package.jsonfrontend/src/router.tsfrontend/src/stores/user.ts
💤 Files with no reviewable changes (2)
- frontend/src/stores/user.ts
- frontend/biome.json
| - repo: https://github.com/oxc-project/mirrors-oxlint | ||
| rev: v1.60.0 | ||
| hooks: | ||
| - id: eslint | ||
| types_or: [javascript, ts] | ||
| args: ["--quiet"] | ||
| # Ignore any files that might contain jinja / bundles | ||
| exclude: | | ||
| (?x)^( | ||
| frontend/components.d.ts| | ||
| frontend/auto-imports.d.ts| | ||
| forms_pro/public/frontend/.*| | ||
| cypress/.*| | ||
| .*node_modules.*| | ||
| .*boilerplate.* | ||
| )$ | ||
| - id: oxlint | ||
| types_or: [javascript, ts, vue] |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
oxlint pre-commit hook mirrors-oxlint config file discovery working directory
💡 Result:
To set up an oxlint pre-commit hook using the mirrors-oxlint repository, add the following to your .pre-commit-config.yaml file: repos: - repo: https://github.com/oxc-project/mirrors-oxlint rev: v1.65.1 # Use the latest release tag from https://github.com/oxc-project/mirrors-oxlint/releases hooks: - id: oxlint verbose: true This hook installs and runs the oxlint npm package via pre-commit's node language support. Pre-commit runs hooks with the git root as the working directory and passes filenames of staged files matching the hook's types (JS/TS/JSX/TSX by default) as arguments to oxlint. Oxlint discovers config files (.oxlintrc.json, oxlint.config.ts/js) by searching from the current working directory (git root) up to the filesystem root. Since the config is typically committed to the repo root, it will be found automatically without needing --config. If your config is in a subdirectory or discovery fails, you can customize the hook in .pre-commit-config.yaml: - id: oxlint verbose: true args: ["--config=.oxlintrc.json"] # or path to your config # Or use entry: "oxlint --config=path/to/config" for more control The mirrors-oxlint repo defines the hook entry as "oxlint" with pass_filenames: true, so filenames are passed correctly for staged files only. Official setup confirmed in Oxc docs: https://oxc.rs/docs/guide/usage/linter/ci#pre-commit
Citations:
- 1: https://oxc.rs/docs/guide/usage/linter/ci
- 2: https://oxc-project.github.io/docs/guide/usage/linter/config.html
- 3: https://oxc.rs/docs/guide/usage/linter/ci.html
- 4: pre-commit support oxc-project/oxc#523
- 5: https://github.com/oxc-project/mirrors-oxlint
- 6: https://oxc.rs/docs/guide/usage/linter/config
- 7: https://oxc-project.github.io/docs/guide/usage/linter.html
- 8: https://oxc-project.github.io/docs/guide/usage/linter/cli.html
🏁 Script executed:
# Search for oxlint config files in the repo
find . -type f \( -name "oxlint.json" -o -name ".oxlintrc.json" -o -name "oxlint.config.ts" -o -name "oxlint.config.js" \) 2>/dev/nullRepository: BuildWithHussain/forms_pro
Length of output: 92
🏁 Script executed:
# Also check for any JS/TS config files in frontend and root
ls -la frontend/ 2>/dev/null | grep -E "\.(json|js|ts)$"Repository: BuildWithHussain/forms_pro
Length of output: 749
🏁 Script executed:
# Check repo root for config files
ls -la . | grep -E "(oxlint|linter)"Repository: BuildWithHussain/forms_pro
Length of output: 52
🏁 Script executed:
# Check the .pre-commit-config.yaml to see other hooks for context
cat -n .pre-commit-config.yaml | head -60Repository: BuildWithHussain/forms_pro
Length of output: 1756
oxlint hook runs from repo root — config not discoverable.
Pre-commit invokes hooks from the repo root, and oxlint.json lives in frontend/. Oxlint searches for config files upward from the working directory to the filesystem root, not downward into subdirectories. Without a --config frontend/oxlint.json argument, the hook will not find your config and will lint all JS/TS/Vue files in the repo with default rules. Add both a files: scope and explicit config path:
Proposed change
- repo: https://github.com/oxc-project/mirrors-oxlint
rev: v1.60.0
hooks:
- id: oxlint
types_or: [javascript, ts, vue]
+ files: ^frontend/
+ args: ["--config=frontend/oxlint.json"]📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - repo: https://github.com/oxc-project/mirrors-oxlint | |
| rev: v1.60.0 | |
| hooks: | |
| - id: eslint | |
| types_or: [javascript, ts] | |
| args: ["--quiet"] | |
| # Ignore any files that might contain jinja / bundles | |
| exclude: | | |
| (?x)^( | |
| frontend/components.d.ts| | |
| frontend/auto-imports.d.ts| | |
| forms_pro/public/frontend/.*| | |
| cypress/.*| | |
| .*node_modules.*| | |
| .*boilerplate.* | |
| )$ | |
| - id: oxlint | |
| types_or: [javascript, ts, vue] | |
| - repo: https://github.com/oxc-project/mirrors-oxlint | |
| rev: v1.60.0 | |
| hooks: | |
| - id: oxlint | |
| types_or: [javascript, ts, vue] | |
| files: ^frontend/ | |
| args: ["--config=frontend/oxlint.json"] |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.pre-commit-config.yaml around lines 44 - 48, The oxlint pre-commit hook is
running from the repo root and cannot discover frontend/oxlint.json; update the
oxlint hook block in .pre-commit-config.yaml (the repo:
https://github.com/oxc-project/mirrors-oxlint entry and its oxlint hook id) to
add a files: pattern limiting linting to frontend sources and pass the explicit
config path (e.g., add args: ["--config", "frontend/oxlint.json"]) so oxlint
runs only against the intended files and uses the frontend/oxlint.json
configuration.
| ```yaml | ||
| - repo: https://github.com/oxc-project/oxlint | ||
| rev: v0.16.6 | ||
| hooks: | ||
| - id: oxlint | ||
| types_or: [javascript, ts, vue] | ||
| ``` |
There was a problem hiding this comment.
Plan doc's pre-commit snippet doesn't match what was shipped.
The plan shows repo: https://github.com/oxc-project/oxlint at rev: v0.16.6, but the actual .pre-commit-config.yaml uses oxc-project/mirrors-oxlint at v1.60.0. Worth updating the plan so it reflects the real outcome (future readers often copy from plan docs).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/superpowers/plans/2026-04-22-biome-to-oxlint.md` around lines 125 - 131,
Update the plan's pre-commit snippet to match the shipped
.pre-commit-config.yaml: replace repo: https://github.com/oxc-project/oxlint and
rev: v0.16.6 with repo: https://github.com/oxc-project/mirrors-oxlint (or short
form oxc-project/mirrors-oxlint) and rev: v1.60.0, preserving the hook id:
oxlint and types_or: [javascript, ts, vue] so the plan reflects the real
configuration readers will copy.
| "build": "vite build --base=/assets/forms_pro/frontend/ && yarn copy-html-entry", | ||
| "preview": "vite preview", | ||
| "lint": "biome check --write .", | ||
| "lint": "oxlint .", |
There was a problem hiding this comment.
Version drift between package.json and pre-commit hook.
package.json pins oxlint to ^1.61.0, but .pre-commit-config.yaml uses rev: v1.60.0. Developers running yarn lint vs pre-commit may see slightly different lint results. Consider aligning the two on the same version.
Also applies to: 40-40
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@frontend/package.json` at line 10, package.json's lint script references
oxlint and the repo pins oxlint at ^1.61.0 while .pre-commit-config.yaml uses
rev: v1.60.0, causing version drift; pick a single oxlint version and make both
places match (either update package.json's pinned version to v1.60.0 or update
.pre-commit-config.yaml rev to v1.61.0 or the exact semver you prefer) so the
"lint" script and the pre-commit hook run the same linter version—update the
package.json dependency string for oxlint and/or the rev value in
.pre-commit-config.yaml accordingly and run the lint command to verify no
regressions.
Summary
@biomejs/biomewithoxlintfor lintingoxlintinstead ofeslintWhy oxlint
Changes
frontend/package.json: swap biome → oxlint, update lint scriptfrontend/oxlint.json: new config filefrontend/biome.json: deleted.pre-commit-config.yaml: eslint → oxlint hookTest plan
yarn lintpasses (0 warnings, 0 errors)yarn typecheckpassespre-commit run --all-filespassesSummary by CodeRabbit
Chores