name: biome-toolchain
description: Configure, run, and migrate JS/TS projects to Biome v2 formatting and linting. Separate safe from unsafe fixes, scope overrides, run biome ci, and pair with tsc for type-aware checks.
category: Document Processing
source: antigravity
tags: [javascript, typescript, node, ai, agent, workflow, template, design, document, cro]
url: https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/biome-toolchain
Biome Toolchain
When to Use
- Set up or update
biome.json (v2 schema, preset, formatter options, and per-path overrides) in a JavaScript or TypeScript repository.
- Migrate formatting and linting from Prettier/ESLint to Biome while tracking gaps that still need
tsc or type-aware lint rules.
- Diagnose Biome diagnostics, distinguish safe vs unsafe autofixes, and wire deterministic
biome ci checks.
Prerequisites
Inspect the repository's package.json, lockfile, installed @biomejs/biome version (npx --no-install biome --version or ./node_modules/.bin/biome --version), existing biome.json / biome.jsonc, and any coexisting ESLint, Prettier, or tsconfig.json setup. Pin $schema in biome.json to the installed Biome version so schema validation matches the binary.
Configure Biome v2 cleanly
- Match the installed schema version (for example Biome 2.6+ uses
"linter": { "rules": { "preset": "recommended" } } rather than the deprecated "recommended": true key; run biome migrate when upgrading older configs).
- Enable VCS integration (
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true }) when appropriate so .gitignore entries are respected without duplicating ignore globs, and use files.includes for generated or vendored exclusions.
- Scope rule relaxations narrowly with
"overrides" (for example turning off suspicious/noExplicitAny only for tests/** rather than disabling it globally).
- In monorepos, place a shared root
biome.json and extend it from packages with "extends": "//" (Biome v2 root-extends syntax) when packages need local overrides.
Separate safe fixes, unsafe fixes, and CI checks
- Run read-only
biome check . first to inspect both formatting and lint diagnostics before mutating files.
biome check --write . applies formatting and safe fixes (such as let → const via useConst) while skipping unsafe fixes (such as renaming unused variables with _ or rewriting + concatenation into template literals, which can change coercion/runtime semantics).
- Never pass
--unsafe blindly across a codebase: inspect every unsafe suggestion and apply only within authorized scope, then re-run unit tests.
- In CI pipelines, run
biome ci . instead of biome check --write . so CI stays strictly read-only, exits nonzero on unformatted code or errors, and emits CI-friendly diagnostics.
Pair Biome with tsc for type-checked invariants
- Biome replaces Prettier and many syntactic/structural ESLint rules at high speed, but it does not replace
tsc --noEmit.
- When migrating off ESLint +
typescript-eslint, inventory every active type-aware rule (such as no-floating-promises or strict unsafe-assignment rules) and confirm whether your Biome version covers it or whether ESLint/Oxlint/TypeScript checks must remain in CI.
Example
Configure a Biome 2.6 project that bans any in src/** while allowing it in tests/**, and prove biome check --write applies safe fixes without silently applying unsafe rewrites.
Run the worked Biome check and safe-fix verification to verify biome.json schema compliance, per-directory overrides, safe vs unsafe autofix behavior, and a passing biome ci run after fixing the source error.
Limitations
- Biome does not perform full TypeScript type checking (
tsc --noEmit remains mandatory for type soundness).
- ESLint ecosystem plugins with framework- or domain-specific rules (such as custom internal plugins) may not have a 1:1 Biome equivalent.
Safety and Side Effects
Inspect package.json scripts and run read-only biome check before --write. Do not run --write --unsafe without reviewing the affected files and running tests. Avoid using npx to download an unpinned Biome binary silently when the project already pins a version in node_modules.
Related Skills and Documentation
1---2name: biome-toolchain3description: Configure, run, and migrate JS/TS projects to Biome v2 formatting and linting. Separate safe from unsafe fixes, scope overrides, run biome ci, and pair with tsc4---5---6name: biome-toolchain7description: Configure, run, and migrate JS/TS projects to Biome v2 formatting and linting. Separate safe from unsafe fixes, scope overrides, run biome ci, and pair with tsc for type-aware checks. 8category: Document Processing9source: antigravity10tags: [javascript, typescript, node, ai, agent, workflow, template, design, document, cro]11url: https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/biome-toolchain12---131415# Biome Toolchain1617## When to Use1819- Set up or update `biome.json` (v2 schema, `preset`, formatter options, and per-path `overrides`) in a JavaScript or TypeScript repository.20- Migrate formatting and linting from Prettier/ESLint to Biome while tracking gaps that still need `tsc` or type-aware lint rules.21- Diagnose Biome diagnostics, distinguish safe vs unsafe autofixes, and wire deterministic `biome ci` checks.2223## Prerequisites2425Inspect the repository's `package.json`, lockfile, installed `@biomejs/biome` version (`npx --no-install biome --version` or `./node_modules/.bin/biome --version`), existing `biome.json` / `biome.jsonc`, and any coexisting ESLint, Prettier, or `tsconfig.json` setup. Pin `$schema` in `biome.json` to the installed Biome version so schema validation matches the binary.2627## Configure Biome v2 cleanly28291. Match the installed schema version (for example Biome 2.6+ uses `"linter": { "rules": { "preset": "recommended" } }` rather than the deprecated `"recommended": true` key; run `biome migrate` when upgrading older configs).302. Enable VCS integration (`"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true }`) when appropriate so `.gitignore` entries are respected without duplicating ignore globs, and use `files.includes` for generated or vendored exclusions.313. Scope rule relaxations narrowly with `"overrides"` (for example turning off `suspicious/noExplicitAny` only for `tests/**` rather than disabling it globally).324. In monorepos, place a shared root `biome.json` and extend it from packages with `"extends": "//"` (Biome v2 root-extends syntax) when packages need local overrides.3334## Separate safe fixes, unsafe fixes, and CI checks3536- Run read-only `biome check .` first to inspect both formatting and lint diagnostics before mutating files.37- `biome check --write .` applies formatting and **safe** fixes (such as `let` → `const` via `useConst`) while skipping **unsafe** fixes (such as renaming unused variables with `_` or rewriting `+` concatenation into template literals, which can change coercion/runtime semantics).38- Never pass `--unsafe` blindly across a codebase: inspect every unsafe suggestion and apply only within authorized scope, then re-run unit tests.39- In CI pipelines, run `biome ci .` instead of `biome check --write .` so CI stays strictly read-only, exits nonzero on unformatted code or errors, and emits CI-friendly diagnostics.4041## Pair Biome with `tsc` for type-checked invariants4243- Biome replaces Prettier and many syntactic/structural ESLint rules at high speed, but it does **not** replace `tsc --noEmit`.44- When migrating off ESLint + `typescript-eslint`, inventory every active type-aware rule (such as `no-floating-promises` or strict unsafe-assignment rules) and confirm whether your Biome version covers it or whether ESLint/Oxlint/TypeScript checks must remain in CI.4546## Example4748> Configure a Biome 2.6 project that bans `any` in `src/**` while allowing it in `tests/**`, and prove `biome check --write` applies safe fixes without silently applying unsafe rewrites.4950Run the [worked Biome check and safe-fix verification](references/biome-check-and-migration.md) to verify `biome.json` schema compliance, per-directory overrides, safe vs unsafe autofix behavior, and a passing `biome ci` run after fixing the source error.5152## Limitations5354- Biome does not perform full TypeScript type checking (`tsc --noEmit` remains mandatory for type soundness).55- ESLint ecosystem plugins with framework- or domain-specific rules (such as custom internal plugins) may not have a 1:1 Biome equivalent.5657## Safety and Side Effects5859Inspect `package.json` scripts and run read-only `biome check` before `--write`. Do not run `--write --unsafe` without reviewing the affected files and running tests. Avoid using `npx` to download an unpinned Biome binary silently when the project already pins a version in `node_modules`.6061## Related Skills and Documentation6263- For general multi-language lint and type-check command workflows, see [Lint and Validate](https://github.com/sickn33/agentic-awesome-skills/blob/main/skills/lint-and-validate/SKILL.md).64- For TypeScript type design and `tsconfig` strictness, see [TypeScript Pro](https://github.com/sickn33/agentic-awesome-skills/blob/main/skills/typescript-pro/SKILL.md).65- See the official Biome documentation on [configuration](https://biomejs.dev/reference/configuration/), [linter rules](https://biomejs.dev/linter/), and [migrating from ESLint and Prettier](https://biomejs.dev/guides/migrate-eslint-prettier/).