Skip to content
biome-setup logo

Biome Setup Skill

biome-setup

Biome linter/formatter setup. Use when configuring Biome as an alternative to ESLint + Prettier.

SKILL.md

Full skill instructions

Biome Setup Skill

This skill covers Biome configuration for TypeScript projects as an alternative to ESLint + Prettier.

When to Use

Use this skill when:

  • Setting up a new project with modern tooling
  • Replacing ESLint + Prettier with a single tool
  • Need faster linting and formatting
  • Want simpler configuration

Core Principle

ONE TOOL, ZERO DEPENDENCIES - Biome replaces both ESLint and Prettier with 10-100x better performance.

Installation

npm install -D @biomejs/​biome

Basic Configuration

biome.json

{
  "$schema": "https://biomejs.dev/​schemas/​1.9.0/​schema.json",
  "organizeImports": {
    "enabled": true
  },
  "linter": {
    "enabled": true,
    "rules": {
      "recommended": true,
      "suspicious": {
        "noExplicitAny": "error",
        "noImplicitAnyLet": "error"
      },
      "correctness": {
        "noUnusedVariables": "error",
        "noUnusedImports": "error"
      },
      "style": {
        "noNonNullAssertion": "warn",
        "useConst": "error",
        "useTemplate": "error"
      },
      "complexity": {
        "noBannedTypes": "error",
        "noUselessTypeConstraint": "error"
      }
    }
  },
  "formatter": {
    "enabled": true,
    "indentStyle": "space",
    "indentWidth": 2,
    "lineWidth": 100
  },
  "javascript": {
    "formatter": {
      "semicolons": "always",
      "quoteStyle": "single",
      "trailingCommas": "all",
      "arrowParentheses": "always"
    }
  },
  "files": {
    "ignore": ["node_modules", "dist", "coverage"]
  }
}

Package.json Scripts

{
  "scripts": {
    "lint": "biome check .",
    "lint:fix": "biome check --write .",
    "format": "biome format --write .",
    "format:check": "biome format ."
  }
}

Key Rules

Type Safety Rules

{
  "linter": {
    "rules": {
      "suspicious": {
        "noExplicitAny": "error",
        "noImplicitAnyLet": "error",
        "noConfusingVoidType": "error",
        "noAsyncPromiseExecutor": "error"
      }
    }
  }
}

noExplicitAny:

// ❌ Error
function process(data: any) { }

// ✅ OK
function process(data: unknown) { }

noImplicitAnyLet:

// ❌ Error
let value;  // implicit any

// ✅ OK
let value: string;
let value: unknown;

Code Quality Rules

{
  "linter": {
    "rules": {
      "correctness": {
        "noUnusedVariables": "error",
        "noUnusedImports": "error",
        "noConstantCondition": "error",
        "noUndeclaredVariables": "error"
      }
    }
  }
}

Style Rules

{
  "linter": {
    "rules": {
      "style": {
        "useConst": "error",
        "useTemplate": "error",
        "noVar": "error",
        "useShorthandFunctionType": "error",
        "useExportType": "error",
        "useImportType": "error"
      }
    }
  }
}

useExportType / useImportType:

// ❌ Error - using value import for type
import { User } from './​types';
export { User };

// ✅ OK - type-only imports/​exports
import type { User } from './​types';
export type { User };

Formatter Configuration

JavaScript/​TypeScript Formatting

{
  "javascript": {
    "formatter": {
      "semicolons": "always",
      "quoteStyle": "single",
      "jsxQuoteStyle": "double",
      "trailingCommas": "all",
      "arrowParentheses": "always",
      "bracketSpacing": true,
      "bracketSameLine": false
    }
  }
}

JSON Formatting

{
  "json": {
    "formatter": {
      "trailingCommas": "none"
    }
  }
}

File-Specific Overrides

{
  "overrides": [
    {
      "include": ["**/​*.test.ts", "**/​*.test.tsx"],
      "linter": {
        "rules": {
          "suspicious": {
            "noExplicitAny": "off"
          }
        }
      }
    },
    {
      "include": ["*.config.js", "*.config.ts"],
      "linter": {
        "rules": {
          "style": {
            "noDefaultExport": "off"
          }
        }
      }
    }
  ]
}

VS Code Integration

Install Extension

Install "Biome" extension from VS Code marketplace.

settings.json

{
  "editor.defaultFormatter": "biomejs.biome",
  "editor.formatOnSave": true,
  "editor.codeActionsOnSave": {
    "quickfix.biome": "explicit",
    "source.organizeImports.biome": "explicit"
  },
  "[javascript]": {
    "editor.defaultFormatter": "biomejs.biome"
  },
  "[typescript]": {
    "editor.defaultFormatter": "biomejs.biome"
  },
  "[json]": {
    "editor.defaultFormatter": "biomejs.biome"
  }
}

CLI Commands

Linting

# Check all files
biome check .

# Check and fix
biome check --write .

# Check specific files
biome check src/

# Check with specific rules
biome check --diagnostic-level=error .

Formatting

# Check formatting
biome format .

# Apply formatting
biome format --write .

# Format specific files
biome format --write src/​**/​*.ts

CI Integration

# Check only (exit non-zero on issues)
biome ci .

Migration from ESLint + Prettier

Step 1: Install Biome

npm uninstall eslint prettier eslint-config-prettier @typescript-eslint/​eslint-plugin @typescript-eslint/​parser
npm install -D @biomejs/​biome

Step 2: Create biome.json

npx biome init

Step 3: Update Scripts

{
  "scripts": {
    "lint": "biome check .",
    "format": "biome format --write ."
  }
}

Step 4: Remove Old Config Files

rm .eslintrc.json .eslintrc.js .prettierrc .prettierignore

Rule Mapping

ESLint RuleBiome Rule
@typescript-eslint/​no-explicit-anysuspicious/​noExplicitAny
@typescript-eslint/​no-unused-varscorrectness/​noUnusedVariables
no-varstyle/​noVar
prefer-conststyle/​useConst
prefer-templatestyle/​useTemplate

Limitations

Biome does not support:

  • Custom rules (plugin ecosystem)
  • Some ESLint-specific rules
  • JSON configuration with comments

Use ESLint if you need:

  • eslint-plugin-react-hooks
  • eslint-plugin-jsx-a11y
  • Custom rule development

Pre-commit Hook

{
  "lint-staged": {
    "*.{ts,tsx,js,jsx,json,md}": [
      "biome check --write --no-errors-on-unmatched"
    ]
  }
}

GitHub Actions

name: Lint

on: [push, pull_request]

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/​checkout@v4
      - uses: actions/​setup-node@v4
        with:
          node-version: '22'
      - run: npm ci
      - run: npx biome ci .

Best Practices Summary

  1. Use biome ci in CI pipelines
  2. Enable organizeImports
  3. Set noExplicitAny to error
  4. Use overrides for test files
  5. Configure VS Code for format on save
  6. Use lint-staged for pre-commit

Code Review Checklist

  • biome.json present in project root
  • noExplicitAny set to error
  • noUnusedVariables enabled
  • Formatter configured consistently
  • VS Code extension installed
  • Pre-commit hook configured
  • CI uses biome ci

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View