Skills2026年4月3日·1 分钟阅读

Biome — Fast Linter & Formatter for JS/TS

One Rust-powered tool replaces ESLint + Prettier. 200+ lint rules, instant formatting. 97% Prettier compatible. 24K+ GitHub stars.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
biome.md
直接安装命令
npx -y tokrepo@latest install f6018b95-6783-42f1-8c39-a0d199f94504 --target codex

先 dry-run 确认安装计划,再运行此命令。

TL;DR
Biome is a Rust-built linter and formatter for JavaScript/TypeScript that runs 25x faster than ESLint + Prettier combined.
§01

What it is

Biome is a Rust-powered toolchain that replaces ESLint and Prettier with a single, fast tool. It formats and lints JavaScript, TypeScript, JSX, TSX, JSON, and CSS with 200+ lint rules and 97% Prettier compatibility. By parsing code once instead of twice (once for linting, once for formatting), Biome achieves significant speed improvements over the traditional ESLint + Prettier setup.

Biome targets JavaScript and TypeScript teams who want faster, simpler code quality tooling. It provides zero-config defaults, a VS Code extension, and built-in import sorting.

§02

How it saves time or tokens

Biome processes files 25x faster than ESLint + Prettier combined because it runs in Rust and parses each file only once. The biome check --write command applies both formatting and lint fixes in a single pass. Zero-config defaults mean new projects get sensible rules immediately without configuring multiple tools.

§03

How to use

  1. Install Biome: npm install --save-dev --save-exact @biomejs/biome.
  2. Initialize configuration: npx @biomejs/biome init (creates biome.json).
  3. Run formatting and linting: npx biome check --write ..
§04

Example

{
  "$schema": "https://biomejs.dev/schemas/1.9.0/schema.json",
  "formatter": {
    "indentStyle": "space",
    "indentWidth": 2
  },
  "linter": {
    "enabled": true,
    "rules": {
      "recommended": true
    }
  },
  "organizeImports": {
    "enabled": true
  }
}
# Format all files
npx biome format --write .

# Lint all files
npx biome lint .

# Both at once
npx biome check --write .
§05

Related on TokRepo

§06

Common pitfalls

  • Biome does not yet support all ESLint plugins; check compatibility before migrating projects that rely on framework-specific rules like eslint-plugin-react-hooks.
  • The 97% Prettier compatibility means 3% of edge cases format differently; run a diff comparison before committing to the migration.
  • Biome's CSS support is newer and less mature than its JavaScript/TypeScript support; test CSS formatting thoroughly.

常见问题

How does Biome compare to ESLint + Prettier?+

Biome combines linting and formatting into one tool, runs 25x faster due to Rust and single-pass parsing, and requires less configuration. ESLint has a larger plugin ecosystem and more community rules.

Is Biome compatible with Prettier formatting?+

Yes, 97% compatible. Biome aims to produce identical output to Prettier for most code. The remaining 3% involves edge cases in comment handling and some expression formatting.

Does Biome have a VS Code extension?+

Yes. The official Biome VS Code extension provides format-on-save, inline lint diagnostics, and quick-fix actions, similar to the ESLint and Prettier extensions.

Can I migrate from ESLint to Biome gradually?+

Yes. Biome provides a migration command that translates your existing ESLint config into Biome rules. You can run both tools during the transition period and compare results.

What languages does Biome support?+

Biome supports JavaScript, TypeScript, JSX, TSX, JSON, and CSS. Support for additional languages like HTML and GraphQL is planned.

引用来源 (3)
  • Biome GitHub— Biome is a Rust-powered toolchain replacing ESLint and Prettier
  • Biome Docs— Biome documentation and configuration reference
  • Prettier Docs— Prettier code formatting specification
🙏

来源与感谢

Created by Biome. Licensed under Apache-2.0.

biome — ⭐ 24,200+

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产