Skip to content

chore: migrate from Biome to oxlint#100

Merged
harshtandiya merged 7 commits into
developfrom
chore/biome-to-oxlint
Apr 22, 2026
Merged

chore: migrate from Biome to oxlint#100
harshtandiya merged 7 commits into
developfrom
chore/biome-to-oxlint

Conversation

@harshtandiya
Copy link
Copy Markdown
Collaborator

@harshtandiya harshtandiya commented Apr 22, 2026

Summary

  • Replace @biomejs/biome with oxlint for linting
  • Update pre-commit to use oxlint instead of eslint
  • Keep Prettier for formatting (via pre-commit)
  • Fix 3 lint warnings found by oxlint

Why oxlint

  • 50-100x faster than ESLint
  • Rust-based, same ecosystem as Ruff
  • Better ESLint rule compatibility than Biome

Changes

  • frontend/package.json: swap biome → oxlint, update lint script
  • frontend/oxlint.json: new config file
  • frontend/biome.json: deleted
  • .pre-commit-config.yaml: eslint → oxlint hook
  • Fixed: unused catch param, unused function, empty destructure pattern

Test plan

  • yarn lint passes (0 warnings, 0 errors)
  • yarn typecheck passes
  • pre-commit run --all-files passes

Summary by CodeRabbit

Chores

  • Migrated from BiomeJS to OXlint as the primary frontend linting tool, including updated configurations and pre-commit hooks
  • Updated development dependencies and build scripts to reflect the new linting setup
  • Configured OXlint with rule severity settings for unused variables, console statements, and strict equality checks
  • Removed legacy BiomeJS configuration and updated documentation references to the new tooling

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 22, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d8c4a28e-4e21-4745-8ee2-6f046eb71a45

📥 Commits

Reviewing files that changed from the base of the PR and between 847a233 and 6171534.

📒 Files selected for processing (1)
  • frontend/e2e/fixtures/test-data.fixture.ts
✅ Files skipped from review due to trivial changes (1)
  • frontend/e2e/fixtures/test-data.fixture.ts

📝 Walkthrough

Walkthrough

The 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

Cohort / File(s) Summary
Linting Toolchain Migration
.pre-commit-config.yaml, frontend/oxlint.json, frontend/package.json
Replaced ESLint mirror hook with OXlint mirror hook; added new oxlint configuration file specifying rule severities and ignore patterns; updated lint script from biome check --write . to oxlint . and swapped @biomejs/biome devDependency for oxlint.
Configuration Removal
frontend/biome.json
Removed Biome configuration file, eliminating formatting and linting setup that is now handled by OXlint and Prettier (via pre-commit).
Documentation
CLAUDE.md
Updated frontend commands guidance comment label from "Lint & format (BiomeJS)" to "Lint (oxlint) & format (Prettier via pre-commit)" without changing the actual command.
Code Adjustments
frontend/src/router.ts, frontend/e2e/fixtures/test-data.fixture.ts, frontend/src/stores/user.ts
Updated error handling syntax in route guard (catch { ... } without binding); added ESLint suppression comment for empty destructuring pattern in Playwright fixture; removed unused getCurrentTeamFromAllTeams() helper function from user store.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Hopping from ESLint to OXlint's delight,
Biome bids farewell, Prettier shines bright,
Configuration dances, dependencies align,
A linting migration, so perfectly fine!

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

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.
Description check ❓ Inconclusive The description includes a clear summary of changes and rationale, but the testing checklist items are not properly marked as completed per the template format, and screenshots/documentation updates are not addressed. Check boxes should show [x] for completed tests and address documentation updates. Include explicit confirmation that all checklist items (title format, documentation, screenshots) are satisfied.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: migrating from Biome to oxlint for linting. It is concise, clear, and directly related to the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/biome-to-oxlint

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.

@harshtandiya harshtandiya enabled auto-merge April 22, 2026 14:27
Copy link
Copy Markdown

@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: 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 | 🟡 Minor

Stale reference to eslint in 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 runs oxlint, not eslint.

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 to ignorePatterns.

The frontend Vite build emits to ../forms_pro/public/frontend/ (see frontend/vite.config.js), not dist/. 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

📥 Commits

Reviewing files that changed from the base of the PR and between 0ff85f1 and 847a233.

⛔ Files ignored due to path filters (1)
  • frontend/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (9)
  • .pre-commit-config.yaml
  • CLAUDE.md
  • docs/superpowers/plans/2026-04-22-biome-to-oxlint.md
  • frontend/biome.json
  • frontend/e2e/fixtures/test-data.fixture.ts
  • frontend/oxlint.json
  • frontend/package.json
  • frontend/src/router.ts
  • frontend/src/stores/user.ts
💤 Files with no reviewable changes (2)
  • frontend/src/stores/user.ts
  • frontend/biome.json

Comment thread .pre-commit-config.yaml
Comment on lines +44 to +48
- 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]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 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:


🏁 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/null

Repository: 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 -60

Repository: 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.

Suggested change
- 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.

Comment on lines +125 to +131
```yaml
- repo: https://github.com/oxc-project/oxlint
rev: v0.16.6
hooks:
- id: oxlint
types_or: [javascript, ts, vue]
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

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.

Comment thread frontend/package.json
"build": "vite build --base=/assets/forms_pro/frontend/ && yarn copy-html-entry",
"preview": "vite preview",
"lint": "biome check --write .",
"lint": "oxlint .",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

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.

@harshtandiya harshtandiya added this pull request to the merge queue Apr 22, 2026
Merged via the queue into develop with commit 17bb3c4 Apr 22, 2026
8 checks passed
@harshtandiya harshtandiya deleted the chore/biome-to-oxlint branch April 22, 2026 18:12
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