refactor(tooling): replace ESLint + Prettier with Biome v2#720
Open
refactor(tooling): replace ESLint + Prettier with Biome v2#720
Conversation
Switch the lint/format toolchain to Biome 2.4.14 for JS/TS/JSX/TSX/JSON/CSS; keep a slim Prettier install for Markdown/YAML (still in-progress in Biome v2). ESLint stack and eslint-config-prettier removed. Why - One binary, one config (biome.jsonc), ~6x faster CI lint job (4.34s -> 0.71s end-to-end on this dev box, with Biome doing strictly more work). - Built-in import organizer (assist.actions.source.organizeImports), plus vcs.useIgnoreFile and per-file useSortedKeys on package.json. - Domain-aware rules (react, test) without third-party plugins. Behavior preserved - All ESLint rule choices ported: noExplicitAny=error, noNamespace=error, noUnusedImports=error; noUnusedVariables/useExhaustiveDependencies/ noCommonJs/noUselessEscape* off (carryover). - Recommended ruleset enabled, with documented disables for rules that misfire on this codebase (a11y on TUI, useHookAtTopLevel false-positive in keybindings/registry.ts) plus targeted-disable + "revisit in follow-up triage PR" notes for noisy rules in existing patterns. Scripts - lint, format, format:check kept (now hybrid: Biome owns code, Prettier owns MD/YAML). - New: lint:fix, check, check:ci. Files - New: biome.jsonc. - Removed: eslint.config.js, .prettierignore. - Tweaked: package.json, .vscode/settings.json, .github/workflows/lint.yml, AGENTS.md, bun.lock. - Source-code fixes (not reformatting): converted 7 eslint-disable comments to biome-ignore in src/tui/auto-copy.ts, src/tui/console-theme.ts, src/core/agents/offSecAgent/offensiveSecurityAgent.ts, src/core/ai/streamIdleTimeout.test.ts, scripts/validate-shell.ts; removed two genuinely-unused imports surfaced by Biome's stricter noUnusedImports in scripts/test-sandbox-playwright.ts and src/tui/components/ascii-art.tsx. Verification: bun run lint, format:check, tsc, test (905/921), build all green. Co-authored-by: Cursor <cursoragent@cursor.com>
Mechanical, no-semantics diff produced by a single `biome check --write` pass
with `assist.actions.source.organizeImports: "on"` from the previous commit.
What changed in each file
- Imports sorted alphabetically by module path
- Named-import members sorted alphabetically within each `{ }` group
- Type-only imports normalized to `import type` form
No behavior changes. No code edits. Spot-check any file with `git diff` —
every hunk is import reordering only. CI is green:
bun run lint / format:check / tsc / test (905/921 passing) / build.
Co-authored-by: Cursor <cursoragent@cursor.com>
8f36d01 to
7919c01
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issues.
Reviewed by Cursor Bugbot for commit 7919c01. Configure here.
- Add source.organizeImports.biome to codeActionsOnSave so imports are auto-sorted on save (separate from source.fixAll.biome which only applies lint fixes) - Remove [mdx] formatter override since MDX was intentionally excluded from Prettier scope (Fern docs use MDX features Prettier can't parse) Co-authored-by: Kyle Ryan <kylejryan@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Switches the lint/format toolchain from ESLint + Prettier to Biome v2.4.14 for JS/TS/JSX/TSX/JSON/CSS, with a slim Prettier install kept solely for Markdown and YAML (still in-progress in Biome v2 per its language support page). All ESLint rule choices and Prettier formatting defaults are preserved; behavior parity verified against the full CI suite.
Lines changed (excluding mechanical reformat)
organizeImportsimport-sorting)The 270-file reformat commit is split out (commit `8f36d01b`) so reviewers can ignore it after a spot-check — every hunk in that commit is alphabetical import sorting, with no semantics changes.
Within the "real changes" bucket, ~157 of the 523 lines are `package.json` getting alphabetized by Biome's `useSortedKeys` (intended QoL), so true intent-only is closer to ~370 LOC of human-meaningful change.
Performance
End-to-end CI lint job timing on this dev machine, 3 warm runs each, median:
Biome utilizes ~700% CPU (parallel across cores) vs ESLint/Prettier's ~200% — the gap widens further on bigger CI boxes. And the new path does strictly more in that 0.7s (lint + format + import-organize, vs old format-only).
Behavior preserved
All ESLint rule choices ported 1:1:
Prettier formatting defaults are preserved (2-space indent, double quotes, semicolons, trailing commas all, line width 80) — Biome v2 defaults match Prettier 3.x defaults.
Quality-of-life additions
Documented deviations from a vanilla port
Each rationale is inline in biome.jsonc:
Source-code fixes (not reformatting)
7 files have intentional non-formatting changes:
Test plan
Follow-ups (deferred to a triage PR)
The 443 warnings + 321 infos surfaced by Biome's broader `recommended` ruleset are out of scope here. The disabled-with-rationale rules in `biome.jsonc` are tagged "revisit in a follow-up triage PR" so they show up via grep when that work is picked up.
Made with Cursor
Note
Medium Risk
Switches the project’s lint/format pipeline and editor integration from ESLint/Prettier to Biome, which can cause CI failures or noisy diffs if rule/format parity isn’t exact. Runtime code behavior should be unaffected aside from any fixes driven by new lint diagnostics.
Overview
Migrates linting/formatting from
ESLint + PrettiertoBiome v2.4.14for JS/TS/JSON/CSS, while keeping Prettier only for Markdown/YAML.Updates the reusable CI lint workflow (
.github/workflows/lint.yml) and VSCode defaults (.vscode/settings.json) to run/fix via Biome (including import organization), adds a newbiome.jsoncwith rule/formatter settings andpackage.json-only key-sorting, and refreshesAGENTS.mdcommand/CI documentation. Removes the repo’s.prettierignorein favor of Biome’s ignore/include configuration.Reviewed by Cursor Bugbot for commit a65de54. Bugbot is set up for automated code reviews on this repo. Configure here.