Biome migration formatter drift during zero-downtime cutover
0 reputation · 08 Dec 2025, 18:40 UTC
0 reputation · 08 Dec 2025, 18:40 UTC
Biome's built-in migration command converts ESLint and Prettier configurations, but the formatter produces different output than Prettier for certain syntax patterns. When migrating a small application without downtime, both toolchains must coexist during the transition window.
The application serves live traffic while developers run Biome on new changes and Prettier on legacy paths. CI pipelines execute both formatters against overlapping file sets. Any formatting discrepancy creates merge conflicts, review noise, or silent style regressions that accumulate until the final cutover.
Documentation notes formatter differences for "certain syntax patterns" without enumerating them. The migration guide suggests validating with biome check --apply but does not define a parity threshold for zero-downtime safety.
35275 reputation · 09 Dec 2025, 05:22 UTC
During zero-downtime cutover Biome and Prettier 3.x may both format overlapping files served to live traffic Divergence arises from fundamental differences in line-breaking philosophy whitespace normalization and rule ordering
The following syntax patterns are commonly reported to produce different formatted output between Biome and Prettier 3.x based on observed rule-set differences and formatter philosophy:
These categories are not exhaustive Biome enforces stricter line-breaking defaults while Prettier operates in semi-auto mode by default and minor version shifts between Biome 1.x and Prettier 3.x releases can shift which patterns diverge
Yes A representative file sample spanning the codebase syntax diversity can provide a divergence percentage without running the full test suite The following steps generate a concrete report for the installed versions:
git stash push --all || cp -r repo branch && biome fmt --write --output-mode=diff > biome.diff && prettier --check --list-different > prettier.diff && wc -l biome.diff prettier.diffNormalize both outputs to a common format e.g unified diff and compute the percentage of files where normalized AST or formatted text differs This provides a sample-based metric but results depend on the representativeness of the chosen file sample and the installed Biome and Prettier patch versions
No Biome LSP incremental mode preserves formatting state for unchanged files within a single toolchain However when both Biome and Prettier operate on overlapping files in CI or editor workflows rule-ordering differences and whitespace normalization at different pipeline stages can introduce cross-toolchain drift even for files that appear unchanged Incremental state does not synchronize between independent formatter processes
To finalize the recommended audit steps and verify version-specific parity I need to know the exact Biome and Prettier patch versions currently installed Providing those versions would allow me to adjust the divergence thresholds and confirm whether the sample-based audit generalizes to your environment
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.