biome format: Check Formatting Without Writing
biome format runs only the formatter, reporting which files would change unless you tell it to write.
format is the analog of prettier --check / --write. In CI you run it without --write so it fails when a file is not formatted.
What it does
biome format formats the given paths. Without --write it prints a diff of files that are not correctly formatted and exits non-zero, so CI fails on unformatted code. With --write it rewrites the files in place.
Common usage
# verify formatting (CI), exits non-zero if anything would change
npx @biomejs/biome format ./src
# apply formatting in place
npx @biomejs/biome format --write ./srcOptions
| Flag | What it does |
|---|---|
| --write | Rewrite files in place (replaces v1 --write was already used; v1 also had no --apply for format) |
| --indent-style=tab|space | Override the indent style for this run |
| --indent-width=<n> | Override indent width |
| --line-width=<n> | Override the print width |
| --quote-style=single|double | Override JS quote style |
| --reporter=github | Emit GitHub Actions annotations |
In CI
Run biome format without --write in CI; a non-zero exit means a file needs formatting and the developer should run --write locally. Most projects use biome check or ci instead so formatting and linting share one parse.
Common errors in CI
format exits 1 when at least one file is not formatted and prints the diff. If it reports unexpected changes, a CLI override such as --indent-style is fighting biome.json; remove the flag and rely on config. "File not found" means a path argument that does not exist.