Skip to content

Biome

Biome handles linting and formatting at roughly 40x ESLint speed. One tool replaces both ESLint and Prettier with unified configuration and sub-second execution.

Usage

# Lint only
biome lint .

# Format only
biome format .

# Both lint and format
biome check .

# With auto-fix
biome check --write .

# JSON output for agents
biome lint --reporter=json .

Configuration

// biome.json
{
  "linter": {
    "enabled": true,
    "rules": {
      "recommended": true,
      "suspicious": {
        "noExplicitAny": "error"
      }
    }
  },
  "formatter": {
    "enabled": true,
    "indentStyle": "space",
    "indentWidth": 2
  }
}

Biome aims for drop-in compatibility with ESLint and Prettier configs, though some edge cases differ. Check the migration guide when moving existing projects.

Workflow Fit

Biome replaces both ESLint and Prettier with one tool and one config file. Execution finishes in under 50ms for typical files.

For agent workflows:

  • --reporter=json outputs structured data
  • --write auto-fixes issues in place

Agent Workflow Example

A TypeScript validation hook using Biome:

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": { "tool_name": "edit", "file_path": "**/*.{ts,tsx}" },
        "command": "biome check --write $FILE_PATH"
      }
    ]
  }
}

This auto-fixes lint issues and formats TypeScript files after every edit.

External Resources