Skip to content
Latchkey

biome check: Lint, Format and Import Checks in One Pass

biome check is the all-in-one command that runs formatting, linting, and import organization over the files you point it at.

check is the command most projects wire into CI. By default it only reports; it exits non-zero on any error so the job fails when something is wrong.

What it does

biome check runs the formatter check, the linter, and import sorting in a single pass over the given paths and prints diagnostics. Without a write flag it makes no changes and exits non-zero if any error-level diagnostic is found, which is what fails the build.

Common usage

Terminal
npx @biomejs/biome check ./src
npx @biomejs/biome check .
# apply safe fixes and formatting
npx @biomejs/biome check --write ./src

Options

FlagWhat it does
<paths>Files or directories to check (default is the current dir behavior in v2)
--writeApply safe fixes and formatting (replaces v1 --apply)
--unsafeAlso apply unsafe fixes (with --write)
--formatter-enabled=falseSkip the formatter for this run
--linter-enabled=falseSkip the linter for this run
--reporter=githubEmit GitHub Actions annotations

In CI

Run check without a write flag in CI so it verifies rather than edits. It is faster than running format and lint separately because it parses each file once. Keep --write out of the CI invocation; use it locally or in a pre-commit hook.

Common errors in CI

check exits 1 when any error-level diagnostic is found and the job fails. If you also want warnings to fail the build, add --error-on-warnings. "No files were processed" with exit 0 usually means your paths matched nothing or everything was ignored by files.includes/ignore. A configuration error in biome.json makes check exit 1 before any file is processed.

Related guides

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