Skip to content

chore: replace biome with oxfmt - #332

Open
keonik wants to merge 1 commit into
mainfrom
chore/oxfmt
Open

chore: replace biome with oxfmt#332
keonik wants to merge 1 commit into
mainfrom
chore/oxfmt

Conversation

@keonik

@keonik keonik commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Finishes the move to oxc. Linting went to oxlint earlier and biome stayed on purely as a formatter, so the repo has been carrying two toolchains to do one job.

Config generated with oxfmt --migrate=biome, which carried every style option across unchanged: 4-space indent, 80 columns, single quotes, no semicolons, es5 trailing commas, arrowParens: always.

No source file changed

Once the config landed, oxfmt --list-different came back empty. oxfmt's output for our TypeScript is byte-identical to biome's, so this is a tooling swap rather than a reformat — nothing to re-review in src/.

$ bun run format:check
All matched files use the correct format.
Finished in 3ms on 48 files using 16 threads.

biome was doing 49 files in 16–19ms. At this size neither is slow enough to matter; the win is one toolchain, not milliseconds.

Scope, deliberately kept where biome had it

oxfmt 0.66 also formats JSON, YAML and Markdown — biome (as configured) did not. Left unscoped it would have:

  • rewritten README lists and tables (- x- x)
  • flipped YAML quote style in dependabot.yml ('/'"/")
  • reordered every key in package.json into a canonical order — same keys, same values, entirely different file

None of that was asked for, so ignorePatterns restricts oxfmt to JS/TS. If you'd rather have one formatter own the Markdown and YAML too, that's a one-line change to ignorePatterns and a separate, purely-churn commit.

Also in here

  • Two dead biome-ignore comments removed (src/index.ts, __tests__/nullables.test.ts). They target biome's linter, which has had linter.enabled: false since the oxlint migration — they were suppressing nothing. oxlint passes clean without them.
  • .vscode/settings.json JS/TS formatter → oxc.oxc-vscode.
  • biome.json deleted, @biomejs/biome dropped from devDependencies.

Verification

bun run lint, bun run format:check, bun run build, bun run test (37/37 files, 70 passed, 1 skipped) — all clean.

One caveat worth stating

oxfmt is 0.66.0 — pre-1.0, and younger than biome. The exposure is low (formatting is checked in CI, and any regression shows up as a diff rather than a runtime bug) but it is not a 1.0 dependency, and --migrate gave a faithful translation rather than a guaranteed-permanent one.

Closes #326, which bumps a dependency this PR deletes.

Finishes the move to oxc. Linting went to oxlint earlier; biome stayed
on only as a formatter, so the repo carried two toolchains to do one
job. Config generated with `oxfmt --migrate=biome`, which carried every
style option across unchanged (4-space, 80 cols, single quotes, no
semicolons, es5 trailing commas).

No source file changes: oxfmt's output for our TS is byte-identical to
biome's, so `--list-different` came back empty once the config landed.
This is a tooling swap, not a reformat.

Scoped to JS/TS via ignorePatterns, matching what biome actually
formatted. oxfmt 0.66 also handles JSON, YAML and Markdown, and left
unscoped it would have:

  - rewritten README lists and tables (`-   x` -> `- x`)
  - flipped YAML quotes (`'/'` -> `"/"`) in dependabot.yml
  - reordered every key in package.json into a canonical order

all churn, none of it asked for. Widening the scope later is a one-line
change to ignorePatterns.

Also drops two dead `biome-ignore` comments: they target biome's linter,
which has had `linter.enabled: false` since the oxlint migration, so
they were suppressing nothing. oxlint is clean without them.

VS Code's JS/TS formatter follows to oxc.oxc-vscode.

Makes #326 (biome 1.9.4 -> 2.5.11) moot.
@keonik keonik added the skip-changeset PR intentionally needs no changeset (docs/CI only) label Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changeset PR intentionally needs no changeset (docs/CI only)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant