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
# preview
npx @biomejs/biome migrate prettier
# write formatter settings into biome.json
npx @biomejs/biome migrate prettier --writeOptions
| Mapping | Result |
|---|---|
| printWidth | formatter.lineWidth |
| tabWidth | formatter.indentWidth |
| useTabs | formatter.indentStyle = tab |
| singleQuote | javascript.formatter.quoteStyle = single |
| semi: false | javascript.formatter.semicolons = asNeeded |
| .prettierignore | Carried 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.