Skip to content

Replace Biome's formatter with oxfmt #1475

Description

@FelixTJDietrich

Important

Deferred — do not start yet. This reformats 804 files under webapp/src and conflicts with
every open branch touching it — currently 4 PRs and ~86 files (#1443, #1448, #1399, #1424).

Unblocks when those branches have merged, and after #1463. If #1464 is also ready by then, land
both reformats in the same window so contributors rebase once instead of twice.

Swap Biome's formatter for oxfmt and remove Biome from the repo. Depends on #1463 (oxlint replaces the linter).

Reformat cost, measured

oxfmt --check against our current Biome output:

Configuration Files it would rewrite
formatting only 28 (8 hand-written, rest generated)
with sortImports, to replace Biome's organizeImports 804

We need the import organising, so it is the 804-file number. This is one PR — the formatter swap and the full reformat land together. The reformat is one commit, and its SHA goes in .git-blame-ignore-revs, which does not exist yet and this issue creates.

Land it in a quiet window

An 804-file reformat conflicts with every open branch touching webapp/src. At the time of writing that is 4 PRs and roughly 84 files (#1443, #1448, #1399, #1424). Check the number again before starting, and coordinate one rebase wave rather than surprising people.

Known differences to decide, not discover

  • sortImports is not organizeImports. It is modelled on eslint-plugin-perfectionist: it does not remove unused imports and does not sort named specifiers within a statement (oxc#20160). Confirm nothing we rely on is lost.
  • oxfmt formats CSS and cannot be told not to per-language. We currently have Biome's CSS formatter off. The only opt-out is a path glob, so add **/*.css to ignorePatterns unless we actually want CSS formatted.
  • oxfmt --migrate biome converts formatter keys only and warns that overrides cannot be migrated. Those are transcribed by hand.
  • oxfmt is still 0.x beta. Check the open idempotency bugs before landing — a formatter that needs two passes to converge makes format:check flap in CI.

Done when

  • pnpm run format and pnpm run check use oxfmt; @biomejs/biome is out of package.json and biome.json is deleted
  • the reformat is one commit, recorded in .git-blame-ignore-revs
  • pnpm run check is idempotent: running format twice produces no second diff
  • CSS is treated deliberately, either formatted or explicitly ignored

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintenanceChores, cleanup, non-functional improvementssize:LThis PR changes 100-499 lines, ignoring generated files.status:blockedBlocked by external dependency or other issuewebappReact app: UI components, routes, state management

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions