src/skills/shared-tooling-biome/SKILL.md
Biome v2 unified linter, formatter, and import organizer — single Rust-powered tool replacing ESLint + Prettier with 97% Prettier compatibility and 20x faster performance
npx skillsauth add agents-inc/skills shared-tooling-biomeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Quick Guide: Biome is a unified linter, formatter, and import organizer for JavaScript, TypeScript, JSX, TSX, JSON, CSS, and GraphQL. Single Rust binary replaces ESLint + Prettier with 97% Prettier compatibility. Use
biome.jsonfor all configuration. Runbiome check --writeto lint, format, and organize imports in one pass. Usebiome ciin pipelines.Current stable version: Biome v2.4.x (March 2026). Biome v2 introduced type-aware linting, nested configs, and a revamped import organizer.
<critical_requirements>
All code must follow project conventions in CLAUDE.md (kebab-case, named exports, import ordering,
import type, named constants)
(You MUST use biome.json or biome.jsonc for ALL configuration — Biome does not use JavaScript config files)
(You MUST pin Biome to an exact version with --save-exact — Biome formatting can change between versions)
(You MUST use biome ci in CI pipelines, NOT biome check — ci is read-only with no --write flag)
(You MUST use biome check --write for local development — runs linter, formatter, and import organizer in one pass)
(You MUST include $schema in biome.json for editor autocompletion and validation)
</critical_requirements>
Auto-detection: Biome, biome.json, biome.jsonc, @biomejs/biome, biome check, biome lint, biome format, biome ci, biome-ignore, organizeImports, biome migrate
When to use:
biome ci--staged flagWhen NOT to use:
tsconfig.json is a separate concern)Key patterns covered:
--staged flag)biome-ignore, biome-ignore-all, range suppressions)Other resources:
Biome unifies linting, formatting, and import organizing into a single tool with a single configuration file. Built in Rust, it delivers 20x faster performance than ESLint + Prettier while maintaining 97% Prettier compatibility.
Core principles:
biome check --write runs everything in one pass (lint + format + organize imports)--unsafe flagEvery Biome project starts with a biome.json at the project root. Use biome init to scaffold one, then customize.
# Install Biome (always pin exact version)
npm install --save-dev --save-exact @biomejs/biome
# Create default biome.json
npx @biomejs/biome init
// biome.json — minimal recommended setup
{
"$schema": "https://biomejs.dev/schemas/2.4.7/schema.json",
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true },
"formatter": { "indentStyle": "space", "indentWidth": 2, "lineWidth": 100 },
"linter": { "rules": { "recommended": true } },
"assist": {
"enabled": true,
"actions": { "source": { "organizeImports": "on" } },
},
}
Why good: $schema enables editor autocompletion, VCS integration respects .gitignore, explicit indentStyle: "space" avoids Biome's tab default, recommended rules provide a strong baseline
// BAD: No schema, no VCS, relying on defaults that differ from Prettier
{ "linter": { "enabled": true } }
Why bad: Missing $schema loses autocompletion, no VCS means linting node_modules, Biome defaults to tabs which surprises Prettier migrants
Full example: See examples/core.md for a production-ready biome.json with overrides, framework configs, and monorepo setup.
Biome provides 459+ rules across 8 groups (accessibility, complexity, correctness, nursery, performance, security, style, suspicious). Rules default to recommended — a curated subset of safe, stable rules. Severity levels: "off", "on", "info", "warn", "error". See reference.md for the full rule groups and severity tables.
Biome v2 introduces domains that group rules by technology. Domains auto-detect from package.json dependencies.
{ "linter": { "domains": { "react": "recommended", "test": "recommended" } } }
Full examples: See examples/linting.md for rule configuration, suppressions, overrides, and import ordering.
Biome's formatter achieves 97% Prettier compatibility. Global settings apply to all languages; language-specific settings override globals. Biome defaults to tabs — set indentStyle: "space" explicitly when migrating from Prettier.
{
"formatter": { "indentStyle": "space", "indentWidth": 2, "lineWidth": 100 },
"javascript": {
"formatter": { "quoteStyle": "double", "semicolons": "always" },
},
"json": { "formatter": { "trailingCommas": "none" } },
"css": { "formatter": { "enabled": true } },
}
Full reference: See examples/formatting.md for all options, Prettier mapping, and language-specific settings.
Biome v2 revamped the import organizer with custom group ordering. Configure under assist.actions.source.organizeImports.
{
"assist": {
"actions": {
"source": {
"organizeImports": {
"level": "on",
"options": {
"groups": [
[":BUN:", ":NODE:"],
":PACKAGE:",
":BLANK_LINE:",
["@company/**"],
":BLANK_LINE:",
":ALIAS:",
":PATH:",
":BLANK_LINE:",
{ "type": true },
],
"identifierOrder": "natural",
},
},
},
},
},
}
Key options: identifierOrder controls named import sorting — "natural" (default, e.g. var1, var2, var11) or "lexicographic" (strict alphabetical). Groups accept predefined matchers, glob patterns ("@my/lib/**"), object matchers ({ "type": true, "source": ["@my/lib"] }), or arrays combining any of these.
| Group | Matches |
| ------------------------- | ------------------------------------------ |
| :NODE: | Node.js built-ins and node: protocol |
| :BUN: | Bun-specific modules |
| :PACKAGE: | Scoped and bare npm packages |
| :PACKAGE_WITH_PROTOCOL: | Packages with a protocol prefix |
| :ALIAS: | Aliased imports (@/, #, ~, $, %) |
| :PATH: | Absolute and relative path imports |
| :URL: | HTTP/HTTPS imports |
| :BLANK_LINE: | Visual separator between groups |
Full examples: See examples/linting.md for import ordering with results.
Use check locally, ci in pipelines. Key commands:
npx biome check --write . # Lint + format + organize imports (auto-fix)
npx biome ci . # CI mode (read-only, optimized for pipelines)
npx biome check --staged --write . # Pre-commit hooks (only staged files)
npx biome check --changed --since=main . # Changed files only
Full reference: See examples/ci.md for complete CLI usage, filtering, and reporting options.
Biome uses biome-ignore comments with required explanations.
// biome-ignore lint/suspicious/noDebugger: needed for local debugging
debugger;
// biome-ignore-all lint/style/noDefaultExport: framework requires default export (top of file only)
// biome-ignore-start lint/suspicious/noDoubleEquals: legacy section
// biome-ignore-end lint/suspicious/noDoubleEquals: legacy section
See reference.md for the full suppression syntax table and specifier levels. See examples/linting.md for inline, file-level, and range suppression examples.
Biome v2 supports nested biome.json files. Each subdirectory can override the root config.
// packages/my-app/biome.json — inherits from root
{ "$schema": "https://biomejs.dev/schemas/2.4.7/schema.json", "extends": "//" }
// packages/legacy-lib/biome.json — relaxes rules
{
"$schema": "https://biomejs.dev/schemas/2.4.7/schema.json",
"root": false,
"linter": { "rules": { "suspicious": { "noExplicitAny": "off" } } },
}
Why good: "extends": "//" shorthand inherits root config, "root": false marks as child, each package can relax or tighten rules independently
Full examples: See examples/core.md for root + child config patterns.
Use overrides for file-pattern-specific configuration without nested config files.
{
"overrides": [
{
"includes": ["**/*.test.ts", "**/*.test.tsx"],
"linter": { "rules": { "suspicious": { "noExplicitAny": "off" } } },
},
{
"includes": ["**/app/**/page.tsx", "**/app/**/layout.tsx"],
"linter": { "rules": { "style": { "noDefaultExport": "off" } } },
},
],
}
Why good: Overrides eliminate suppression comments in every file, test files get relaxed rules, framework conventions handled declaratively
</patterns>Full examples: See examples/linting.md for test, config, and generated file overrides.
Biome is written in Rust and processes files in parallel, making it significantly faster than JavaScript-based alternatives.
| Tool | Format Time (1000 files) | Lint Time (1000 files) | | ----------------- | ------------------------ | ---------------------- | | Biome | ~100ms | ~200ms | | Prettier | ~2000ms | N/A | | ESLint | N/A | ~3000ms | | ESLint + Prettier | ~5000ms | ~5000ms |
Approximate benchmarks. Actual performance varies by project size and rule configuration.
Performance Tips:
biome check instead of running biome format and biome lint separately — single pass is faster.gitignore)--staged or --changed in hooks and CI to process only affected files--profile-rules (v2.4+) to identify slow lint rules in your configurationType-Aware Linting Performance:
Biome v2 introduced type-aware linting without the TypeScript compiler. Enable selectively:
<decision_framework>
Need linting and formatting?
|-- Greenfield project?
| |-- Want simplest possible setup? -> Biome (one tool, one config)
| |-- Need niche ESLint plugins? -> ESLint + Prettier
| +-- Speed is important? -> Biome (20x faster)
|-- Existing ESLint + Prettier project?
| |-- Happy with current setup? -> Stay with ESLint + Prettier
| |-- Config complexity is a pain? -> Migrate to Biome
| |-- Need ESLint plugins without Biome equivalents? -> Stay
| +-- Want faster CI/pre-commit hooks? -> Biome (or hybrid)
+-- Monorepo?
|-- Need per-package lint configs? -> Biome v2 nested configs or ESLint 10
+-- Speed bottleneck in CI? -> Biome
How to configure Biome?
|-- Just starting out? -> Run `biome init`, use defaults with recommended: true
|-- Migrating from ESLint? -> Run `biome migrate eslint --write`
|-- Migrating from Prettier? -> Run `biome migrate prettier --write`
|-- Need per-file rules?
| |-- Different rules for test files? -> Use `overrides` in biome.json
| +-- Different rules per package? -> Use nested biome.json with "root": false
+-- Need custom import ordering? -> Configure organizeImports.options.groups
Full migration decision tree: See examples/migration.md.
</decision_framework>
Works with:
react domain for React-specific lint ruleshtml.experimentalFullSupportEnabled (v2.4+)Replaces / Conflicts with:
</integration>CI/editor integration: See examples/ci.md and examples/core.md.
<red_flags>
High Priority Issues:
biome check in CI instead of biome ci (check allows --write which is dangerous in pipelines; ci is read-only)--save-exact (formatting can change between minor versions, causing diff noise)$schema in biome.json (loses editor autocompletion, validation, and discoverability)biome format and biome lint separately when biome check does both (wastes time, parses files twice)Medium Priority Issues:
indentStyle: "space" when migrating from Prettier (Biome defaults to tabs)--unsafe without reviewing changes (unsafe fixes can alter program behavior)--no-errors-on-unmatched in git hooks (causes failures when no matching files are staged)Common Mistakes:
"root": true in a nested config (this is the default; use "root": false for child configs)biome migrate --write when upgrading major versions (config schema changes between v1 and v2)biome-ignore lint: requires text after the colon)Gotchas & Edge Cases:
indentStyle explicitly when migrating from Prettier"formatter": { "enabled": true }biome-ignore-all must be at the top of the file — placing it mid-file triggers an unused suppression warningassist, not linter — configure under assist.actions.source.organizeImports--staged flag makes lint-staged unnecessary for Biome-only setups (since Biome v1.7.0+)biome migrate eslint --write does not migrate inspired rules by default — use --include-inspired to include thembiome-ignore-start/biome-ignore-end) must have matching rule specifiersjavascript config key — there is no separate typescript section.biome.json (with leading dot) are also discovered (v2.4+)</red_flags>
<critical_reminders>
All code must follow project conventions in CLAUDE.md (kebab-case, named exports, import ordering,
import type, named constants)
(You MUST use biome.json or biome.jsonc for ALL configuration — Biome does not use JavaScript config files)
(You MUST pin Biome to an exact version with --save-exact — Biome formatting can change between versions)
(You MUST use biome ci in CI pipelines, NOT biome check — ci is read-only with no --write flag)
(You MUST use biome check --write for local development — runs linter, formatter, and import organizer in one pass)
(You MUST include $schema in biome.json for editor autocompletion and validation)
Failure to follow these rules will cause inconsistent formatting, broken CI pipelines, and missed lint errors.
</critical_reminders>
development
Material Design component library for Vue 3
development
VitePress 1.x — Vue-powered static site generator for documentation sites, built on Vite
tools
Docusaurus 3.x documentation framework — site configuration, docs/blog plugins, sidebars, versioning, MDX, swizzling, and deployment
development
TanStack Form patterns - useForm, form.Field, validators, arrays, linked fields, createFormHook, type safety