Skip to content
Latchkey

biome migrate prettier: Import Prettier Config

biome migrate prettier reads your Prettier configuration and ignore file and writes the equivalent formatter settings into biome.json.

Most Prettier options have a direct Biome counterpart, so this migration is usually clean. The ignore file is carried over too.

What it does

biome migrate prettier reads .prettierrc (and friends) plus .prettierignore and updates biome.json formatter settings to match, mapping options like printWidth to lineWidth, tabWidth to indentWidth, and singleQuote to quoteStyle. It only writes with --write.

Common usage

Terminal
# preview
npx @biomejs/biome migrate prettier
# write formatter settings into biome.json
npx @biomejs/biome migrate prettier --write

Options

MappingResult
printWidthformatter.lineWidth
tabWidthformatter.indentWidth
useTabsformatter.indentStyle = tab
singleQuotejavascript.formatter.quoteStyle = single
semi: falsejavascript.formatter.semicolons = asNeeded
.prettierignoreCarried into files.ignore

In CI

Migrate locally and commit biome.json, then run biome ci in the pipeline. Biome is not byte-for-byte identical to Prettier, so expect a one-time formatting diff after switching; apply it with biome format --write in a single commit so CI is clean afterward.

Common errors in CI

"Cannot find the Prettier configuration" means no .prettierrc was found; an inline config in package.json under a "prettier" key is also read. Options with no Biome equivalent (some plugin options) are skipped. The first biome ci after migrating often fails on formatting until you run format --write once.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →