Biome: One Tool for Linting and Formatting, as a Deploy Gate
Most JavaScript projects run two separate tools for code quality — ESLint to catch problems and Prettier to enforce formatting — each with its own config, plugins, and startup cost. Biome replaces both with a single fast binary. This guide covers setting up Biome and running it as a quality gate in your DeployHQ pipeline so nothing unformatted or lint-failing reaches production.
What is Biome?
Biome is a toolchain for web projects, written in Rust, that lints and formats JavaScript, TypeScript, JSX, and JSON. One tool, one config file, one dependency — where you'd previously wire up ESLint plus Prettier plus a handful of plugins. It's fast enough that running it feels instant even on large codebases, which matters when it runs on every commit and every deploy.
Installing Biome
Install it as an exact dev dependency (Biome recommends pinning the version so formatting stays consistent across a team):
npm install -D --save-exact @biomejs/biome
Generate a config file:
npx biome init
This creates a biome.json where you enable the formatter, the linter, and any rule adjustments.
Everyday commands
Biome exposes formatting and linting together or separately:
npx biome check . # lint + format check (no changes written)
npx biome check --write . # apply safe fixes and formatting
npx biome format --write . # formatting only
npx biome lint . # linting only
biome check is the one to remember — it reports both formatting and lint issues in a single pass. During development, --write fixes what it safely can.
Using Biome as a deploy gate in DeployHQ
Biome ships a command built for exactly this: biome ci. It runs the same checks as biome check but in a mode tuned for continuous integration — it never writes changes and exits with a failing code if anything is wrong. That failing exit code is what turns it into a deployment gate.
Add it as a step in your build pipeline, set to halt on error, before the build:
npm ci
npx biome ci . # fails the pipeline on any lint or format issue
npm run build
Now a formatting slip or a lint error stops the deploy instead of landing in production. Enable automatic deployments so every push is checked automatically — the standard is enforced by the pipeline, not by whoever remembers to run it.
Linting plus testing: the full gate
A linter and a test runner cover different failures — Biome catches code-quality and formatting issues, tests catch behavior regressions. Running both as pipeline gates gives you a deploy that has to be both clean and correct. Pair this with a Vitest test gate so a push must pass linting and the test suite before it ships, and define the commands once with a command runner like just so local and pipeline runs stay identical.
Ready to enforce code quality on every deploy? Create a free DeployHQ account and connect your repository in minutes.