← Back to archive

Repo of the Day

biomejs/biome

Published: Dec 10, 2024

Open repository ↗

A toolchain for web projects, aimed to provide functionalities to maintain them. Biome offers formatter and linter, usable via CLI and LSP.

Summary

Biome is a toolchain for web projects written in Rust that combines a formatter and linter for JavaScript, TypeScript, JSX, JSON, CSS, and GraphQL. It ships with a CLI, an LSP integration, and editor extensions, and is designed to replace the separate tools typically used for these tasks. The project is distributed via npm and licensed under Apache-2.0 (with the README also offering an MIT alternative).

What it is useful for

Biome is useful when engineers want a single tool to format and lint a web codebase instead of maintaining separate Prettier and ESLint setups. The README documents support for over 500 lint rules drawn from ESLint, typescript-eslint, and other sources, and states the tool scores 97% compatibility with Prettier (implying some formatting edge cases differ). Engineers working on front-end projects can use the same CLI to format files, lint files, run combined checks, or run CI verification. The README also notes that Biome does not require Node.js, which is useful in environments without a Node runtime, and provides LSP-based editor integration for in-editor diagnostics and fixes.

How engineers can use it

The README documents this installation step:

npm install --save-dev --save-exact @biomejs/biome

Documented commands then:

  • npx @biomejs/biome format --write to format files
  • npx @biomejs/biome lint --write to lint and apply safe fixes
  • npx @biomejs/biome check --write to run format, lint, and other checks together
  • npx @biomejs/biome ci to verify all files in CI environments

The README states that Biome "has sane defaults" and "doesn't require configuration," so the above commands work without a config file, though configuration options exist for teams that need them. For quick experimentation without installing, the README points to a WebAssembly-based online playground. Editor users can install the first-party VS Code or Open VSX extensions to format and lint as they type. For setup beyond what is shown here, the README directs readers to the Getting Started guide.