home / skills / yonatangross / orchestkit / biome-linting

biome-linting skill

/plugins/ork/skills/biome-linting

This skill speeds up code quality by applying Biome 2.0 linting and formatting across projects, with type inference and CI-ready rules.

npx playbooks add skill yonatangross/orchestkit --skill biome-linting

Review the files below or copy the command above to add this skill to your agents.

Files (9)
SKILL.md
3.6 KB
---
name: biome-linting
description: Biome 2.0+ linting and formatting for fast, unified code quality. Includes type inference, ESLint migration, CI integration, and 421 lint rules. Use when migrating from ESLint/Prettier or setting up new projects.
context: fork
agent: frontend-ui-developer
version: 1.0.0
tags: [biome, linting, formatting, eslint-migration, ci, code-quality, typescript]
user-invocable: false
---

# Biome Linting

Fast, unified linting and formatting (10-25x faster than ESLint + Prettier).

## Why Biome in 2026

| Aspect | Biome | ESLint + Prettier |
|--------|-------|-------------------|
| Speed | ~200ms for 10k lines | 3-5s |
| Config files | 1 (biome.json) | 4+ |
| npm packages | 1 binary | 127+ |
| Rules | 421 | Varies by plugins |
| Type inference | Yes (v2.0+) | Requires tsconfig |

## Quick Start

```bash
# Install
npm install --save-dev --save-exact @biomejs/biome

# Initialize
npx @biomejs/biome init

# Check (lint + format)
npx @biomejs/biome check .

# Fix
npx @biomejs/biome check --write .

# CI mode (fails on errors)
npx @biomejs/biome ci .
```

## Biome 2.0 Features

**Type Inference**: Reads `.d.ts` from node_modules for type-aware rules:

```json
{
  "linter": {
    "rules": {
      "nursery": {
        "noFloatingPromises": "error"  // Catches unhandled promises
      }
    }
  }
}
```

**Multi-file Analysis**: Cross-module analysis for better diagnostics.

## Basic Configuration

```json
{
  "$schema": "https://biomejs.dev/schemas/2.0.0/schema.json",
  "formatter": {
    "enabled": true,
    "indentStyle": "space",
    "indentWidth": 2,
    "lineWidth": 100
  },
  "linter": {
    "enabled": true,
    "rules": {
      "recommended": true,
      "correctness": {
        "noUnusedVariables": "error",
        "noUnusedImports": "error"
      },
      "suspicious": {
        "noExplicitAny": "warn"
      }
    }
  },
  "javascript": {
    "formatter": {
      "quoteStyle": "single",
      "trailingCommas": "all"
    }
  }
}
```

## ESLint Migration

```bash
# Auto-migrate configuration
npx @biomejs/biome migrate eslint --write
```

**Common Rule Mappings:**
| ESLint | Biome |
|--------|-------|
| no-unused-vars | correctness/noUnusedVariables |
| no-console | suspicious/noConsole |
| @typescript-eslint/* | Most supported |
| eslint-plugin-react | Most supported |
| eslint-plugin-jsx-a11y | Most supported |

## CI Integration

```yaml
# .github/workflows/lint.yml
- uses: biomejs/setup-biome@v2
- run: biome ci .
```

## Overrides for Gradual Adoption

```json
{
  "overrides": [
    {
      "include": ["*.test.ts", "*.spec.ts"],
      "linter": {
        "rules": {
          "suspicious": { "noExplicitAny": "off" }
        }
      }
    },
    {
      "include": ["legacy/**"],
      "linter": { "enabled": false }
    }
  ]
}
```

## Key Decisions

| Decision | Recommendation |
|----------|----------------|
| New vs migration | Biome first for new projects; migrate existing gradually |
| Config strictness | Start with recommended, tighten over time |
| CI strategy | Use `biome ci` for strict mode, `biome check` for local |
| Type inference | Enable for TypeScript projects (v2.0+) |

## Related Skills

- `vite-advanced` - Build tooling integration
- `react-server-components-framework` - React linting rules
- `ci-cd-engineer` - CI pipeline setup

## References

- [ESLint Migration](references/eslint-migration.md) - Step-by-step migration
- [Biome Config](references/biome-json-config.md) - Full configuration options
- [Type-Aware Rules](references/type-aware-rules.md) - Biome 2.0 type inference
- [CI Integration](references/ci-integration.md) - GitHub Actions setup

Overview

This skill provides Biome 2.0+ linting and formatting for fast, unified code quality across TypeScript and JavaScript projects. It replaces slow, multi-package ESLint+Prettier setups with a single binary and a single config file, offering 421 built-in lint rules and type-aware analysis. Use it to speed up developer feedback loops and simplify CI linting and formatting.

How this skill works

The tool runs a combined linter and formatter from one biome.json configuration, performing multi-file analysis and type inference by reading .d.ts from node_modules. It can auto-migrate common ESLint rules, run in strict CI mode (failing on errors), and apply per-path overrides so teams can adopt it gradually. Commands include check, check --write (fix), ci (strict), and migrate eslint for automated config conversion.

When to use it

  • Starting a new TypeScript or JavaScript project and preferring a single fast tool for linting and formatting.
  • Migrating from ESLint + Prettier to a simpler, faster pipeline with type-aware rules.
  • Speeding up local and CI lint passes where performance matters (large repos or many files).
  • Enforcing consistent formatting and correctness rules across monorepos or multi-package workspaces.
  • Adding strict CI validation that fails the build on lint errors.

Best practices

  • Initialize with npx @biomejs/biome init and keep one biome.json for project-wide settings.
  • Start with the recommended rule set and gradually tighten rules using overrides for legacy code.
  • Enable type inference for TypeScript projects to leverage type-aware correctness rules.
  • Use biome ci in CI workflows to enforce strict checks and biome check --write locally to auto-fix formatting.
  • Run automated ESLint migration (npx @biomejs/biome migrate eslint --write) and review mapping for custom plugins.

Example use cases

  • Replace an ESLint+Prettier stack in an existing React + TypeScript repo to reduce CI runtime from seconds to hundreds of milliseconds.
  • Adopt a single linter/formatter in a new monorepo to remove cross-package config drift and package bloat.
  • Introduce type-aware rules to catch runtime issues like unhandled promises and unused types.
  • Create CI lint jobs that fail on any error while allowing developers to run quick local fixes.
  • Apply overrides to disable strict rules for legacy directories while enabling them for new code.

FAQ

Will Biome support my existing ESLint rules and plugins?

Biome maps most common ESLint rules and supports many plugin behaviors; use the migrate eslint command to convert configs and manually review custom or uncommon plugins.

How do I adopt Biome gradually in a large codebase?

Use biome overrides to disable or relax rules for legacy paths, enable recommended rules for new code, and run CI in strict mode once coverage is acceptable.