Gem formattingjavascript

Biome

One fast tool for formatting and linting JS, TS, JSON and CSS.

Would you recommend Biome?

No votes yet. Tried it? Be the first to say.

One vote per person. No account needed.

Overview

Biome is a Rust-based formatter and linter with Prettier-compatible formatting and hundreds of lint rules. One config file, one dependency, and it runs in milliseconds on large repos.

Instead of

ESLint + Prettier + their plugin and config sprawl

Reach for it when

Lint/format is slow, or you are tired of keeping ESLint and Prettier configs in sync.

Key features

  • Formatter

    Prettier-compatible formatting for JavaScript, TypeScript, JSX, JSON and CSS, fast enough to run on every save.

  • Linter

    Hundreds of lint rules, many ported from ESLint, typescript-eslint and popular plugins, with safe auto-fixes.

  • One command

    biome check --write formats, lints and organises imports in a single pass.

  • Migration helpers

    biome migrate eslint and biome migrate prettier translate your existing config.

  • CI mode

    biome ci runs everything read-only and fails the build on problems, with readable diagnostics.

  • Editor integration

    Official VS Code and JetBrains extensions plus an LSP server for other editors.

In depth

Why teams switch

Most JavaScript projects run two tools that overlap and occasionally fight: ESLint for correctness and Prettier for style, plus a stack of plugins and shared configs to keep them in sync. Biome does both jobs in one Rust binary with one config. The speed matters in practice: linting becomes cheap enough to run on every save and in every pre-commit hook without anyone noticing.

Migrating an existing project

bash
npm i -D -E @biomejs/biome
npx @biomejs/biome init
npx @biomejs/biome migrate eslint --write
npx @biomejs/biome migrate prettier --write
npx @biomejs/biome check --write .

Review the resulting diff, then remove ESLint, Prettier and their plugins from package.json once you're happy.

A typical config

json
{
  "formatter": { "indentStyle": "space", "indentWidth": 2, "lineWidth": 100 },
  "linter": {
    "rules": {
      "recommended": true,
      "suspicious": { "noExplicitAny": "warn" }
    }
  },
  "javascript": { "formatter": { "quoteStyle": "single" } }
}

In CI and hooks

  • Use npx @biomejs/biome ci . in your pipeline. It never writes files and exits non-zero on any issue.
  • In a pre-commit hook, biome check --write --staged only touches staged files.
  • Rules can be suppressed per line with // biome-ignore lint/<group>/<rule>: reason, and the reason is required, which keeps suppressions honest.

Strengths

  • One dependency and one config file (biome.json) instead of a tangle of ESLint and Prettier plugins.
  • Very fast; large repos lint and format in a fraction of a second, which makes pre-commit hooks painless.
  • Clear, well-written error messages that explain why a rule fired and how to fix it.
  • Formatting output closely matches Prettier, so switching rarely produces a huge diff.

Watch out for

  • Not every ESLint rule or plugin has an equivalent. Check that the rules your team relies on exist before switching.
  • Type-aware linting is far less complete than typescript-eslint with full type information.
  • Support for framework files such as Vue, Svelte and Astro is still partial compared with plain JS/TS.
  • The plugin system is young, so custom rules aren't as easy to write as in ESLint.

Try it in a few minutes

Terminal
npm i -D -E @biomejs/biome
npx @biomejs/biome init
npx @biomejs/biome check --write .

Alternatives

ESLint + Prettier

The established combination with the biggest rule and plugin ecosystem, but slower and more config to maintain.

Oxlint

Another very fast Rust linter from the Oxc project. Often used alongside ESLint rather than replacing formatting.

dprint

A fast, pluggable formatter if you only want to replace Prettier.

Deno lint and fmt

Built in if you're already on Deno.

Related tools

Other tools that share topics with Biome.

Bun

bun.sh
Gem

A fast JavaScript runtime, package manager, bundler and test runner in one binary.

Instead of Node.js + npm + ts-node + Jest + a bundler

Testcontainers

testcontainers.com
Gem

Spin up real databases and services in Docker from inside your tests.

Instead of Mocked database layers, shared test databases, hand-written docker-compose setup

Scalar

scalar.com
Gem

Modern, interactive API reference docs and an offline-first API client, both driven by OpenAPI.

Instead of Swagger UI or Redoc for API docs; Postman for OpenAPI-based APIs