chore: replace biome with oxfmt - #332
Open
keonik wants to merge 1 commit into
Open
Conversation
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.
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.
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,es5trailing commas,arrowParens: always.No source file changed
Once the config landed,
oxfmt --list-differentcame 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 insrc/.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:
- x→- x)dependabot.yml('/'→"/")package.jsoninto a canonical order — same keys, same values, entirely different fileNone of that was asked for, so
ignorePatternsrestricts oxfmt to JS/TS. If you'd rather have one formatter own the Markdown and YAML too, that's a one-line change toignorePatternsand a separate, purely-churn commit.Also in here
biome-ignorecomments removed (src/index.ts,__tests__/nullables.test.ts). They target biome's linter, which has hadlinter.enabled: falsesince the oxlint migration — they were suppressing nothing. oxlint passes clean without them..vscode/settings.jsonJS/TS formatter →oxc.oxc-vscode.biome.jsondeleted,@biomejs/biomedropped 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
--migrategave a faithful translation rather than a guaranteed-permanent one.Closes #326, which bumps a dependency this PR deletes.