biome by bobmatnyc/claude-mpm-skills
npx skills add https://github.com/bobmatnyc/claude-mpm-skills --skill biomeBiome 是一个用 Rust 编写的快速、一体化 Web 项目工具链。它用一个工具同时替代了 ESLint 和 Prettier,速度提升了 100 倍,并提供零配置默认值。
主要特性:
安装:
npm install --save-dev @biomejs/biome
# 创建 biome.json 配置文件
npx @biomejs/biome init
# 检查你的项目
npx @biomejs/biome check .
# 自动修复问题
npx @biomejs/biome check --write .
# 仅格式化
npx @biomejs/biome format --write .
# 仅检查代码
npx @biomejs/biome lint .
{
"scripts": {
"check": "biome check .",
"check:write": "biome check --write .",
"format": "biome format --write .",
"lint": "biome lint .",
"lint:fix": "biome lint --write ."
}
}
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": false,
"ignore": ["node_modules", "dist", "build", ".next"]
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 100
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"semicolons": "asNeeded",
"trailingCommas": "all"
}
}
}
check 命令同时运行代码检查和格式化:
# 检查所有文件
biome check .
# 自动修复问题
biome check --write .
# 不安全修复(可能改变行为)
biome check --write --unsafe .
# 应用建议的修复
biome check --write --unsafe --apply-suggested
# 检查特定文件
biome check src/**/*.ts
# CI 模式(发现问题时退出并报错)
biome ci .
仅格式化代码,不进行代码检查:
# 格式化所有文件
biome format --write .
# 检查格式化而不修改文件
biome format .
# 格式化特定文件
biome format --write src/**/*.{ts,tsx,js,jsx}
# 格式化标准输入
echo "const x={a:1}" | biome format --stdin-file-path=file.js
仅进行代码检查,不格式化:
# 检查所有文件
biome lint .
# 修复代码检查问题
biome lint --write .
# 显示规则名称
biome lint --verbose .
# 应用不安全修复
biome lint --write --unsafe .
{
"formatter": {
"enabled": true,
"formatWithErrors": false,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 80,
"attributePosition": "auto"
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"jsxQuoteStyle": "double",
"quoteProperties": "asNeeded",
"trailingCommas": "all",
"semicolons": "asNeeded",
"arrowParentheses": "always",
"bracketSpacing": true,
"bracketSameLine": false
}
},
"json": {
"formatter": {
"trailingCommas": "none"
}
}
}
{
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"a11y": {
"recommended": true,
"noAutofocus": "error",
"useKeyWithClickEvents": "warn"
},
"complexity": {
"recommended": true,
"noForEach": "off",
"useLiteralKeys": "error"
},
"correctness": {
"recommended": true,
"noUnusedVariables": "error",
"useExhaustiveDependencies": "warn"
},
"performance": {
"recommended": true,
"noAccumulatingSpread": "warn"
},
"security": {
"recommended": true,
"noDangerouslySetInnerHtml": "error"
},
"style": {
"recommended": true,
"noNonNullAssertion": "warn",
"useConst": "error",
"useTemplate": "warn"
},
"suspicious": {
"recommended": true,
"noExplicitAny": "warn",
"noArrayIndexKey": "error"
}
}
}
}
{
"files": {
"ignore": [
"node_modules",
"dist",
"build",
".next",
"coverage",
"*.min.js",
"public/assets/**"
],
"ignoreUnknown": false,
"include": ["src/**/*.ts", "src/**/*.tsx"]
}
}
{
"overrides": [
{
"include": ["**/*.test.ts", "**/*.spec.ts"],
"linter": {
"rules": {
"suspicious": {
"noExplicitAny": "off"
}
}
}
},
{
"include": ["scripts/**/*.js"],
"formatter": {
"lineWidth": 120
}
}
]
}
# 从 VS Code 市场安装
code --install-extension biomejs.biome
.vscode/settings.json){
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit",
"source.organizeImports.biome": "explicit"
}
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit",
"source.organizeImports.biome": "explicit"
}
},
"[typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true
},
"biome.lspBin": "./node_modules/@biomejs/biome/bin/biome"
}
{
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.defaultFormatter": "biomejs.biome",
"biome.rename": true,
"files.autoSave": "onFocusChange"
}
# 移除 ESLint 和 Prettier
npm uninstall eslint prettier eslint-config-prettier \
eslint-plugin-react eslint-plugin-import \
@typescript-eslint/parser @typescript-eslint/eslint-plugin
# 移除配置文件
rm .eslintrc.js .eslintrc.json .prettierrc .prettierignore
使用 Biome 的迁移工具:
# 从 Prettier 配置迁移
biome migrate prettier --write
# 从 ESLint 配置迁移
biome migrate eslint --write
Prettier → Biome 格式化器:
// .prettierrc (旧)
{
"semi": false,
"singleQuote": true,
"trailingComma": "all",
"printWidth": 100
}
// biome.json (新)
{
"formatter": {
"lineWidth": 100
},
"javascript": {
"formatter": {
"semicolons": "asNeeded",
"quoteStyle": "single",
"trailingCommas": "all"
}
}
}
ESLint → Biome 代码检查器:
// .eslintrc.json (旧)
{
"rules": {
"no-unused-vars": "error",
"prefer-const": "warn"
}
}
// biome.json (新)
{
"linter": {
"rules": {
"correctness": {
"noUnusedVariables": "error"
},
"style": {
"useConst": "warn"
}
}
}
}
{
"scripts": {
"lint": "biome lint .",
"lint:fix": "biome lint --write .",
"format": "biome format --write .",
"check": "biome check --write ."
}
}
# 安装依赖
npm install --save-dev husky lint-staged
npx husky init
.husky/pre-commit:
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npx lint-staged
package.json:
{
"lint-staged": {
"*.{js,ts,jsx,tsx,json}": [
"biome check --write --no-errors-on-unmatched"
]
}
}
lefthook.yml:
pre-commit:
commands:
lint:
glob: "*.{js,ts,jsx,tsx,json}"
run: biome check --write --no-errors-on-unmatched {staged_files}
.git/hooks/pre-commit:
#!/bin/bash
# 获取暂存文件
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -E '\.(js|ts|jsx|tsx|json)$')
if [ -n "$STAGED_FILES" ]; then
echo "在暂存文件上运行 Biome..."
npx @biomejs/biome check --write --no-errors-on-unmatched $STAGED_FILES
# 将格式化后的文件重新添加到暂存区
git add $STAGED_FILES
fi
name: Biome CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
biome:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run Biome CI
run: npx @biomejs/biome ci .
- name: Check formatting
run: npx @biomejs/biome format .
- name: Lint
run: npx @biomejs/biome lint .
biome:
image: node:20-alpine
stage: test
script:
- npm ci
- npx @biomejs/biome ci .
cache:
paths:
- node_modules/
only:
- merge_requests
- main
version: 2.1
jobs:
biome:
docker:
- image: cimg/node:20.11
steps:
- checkout
- restore_cache:
keys:
- deps-{{ checksum "package-lock.json" }}
- run: npm ci
- save_cache:
paths:
- node_modules
key: deps-{{ checksum "package-lock.json" }}
- run: npx @biomejs/biome ci .
workflows:
test:
jobs:
- biome
Biome 包含内置的导入排序功能:
# 整理导入
biome check --write --organize-imports-enabled=true .
配置:
{
"organizeImports": {
"enabled": true
}
}
示例:
// 排序前
import { useState } from 'react';
import axios from 'axios';
import { Button } from './components/Button';
import type { User } from './types';
import './styles.css';
// 排序后
import type { User } from './types';
import axios from 'axios';
import { useState } from 'react';
import { Button } from './components/Button';
import './styles.css';
Biome 提供一流的 TypeScript 支持:
{
"linter": {
"rules": {
"suspicious": {
"noExplicitAny": "warn",
"noUnsafeDeclarationMerging": "error"
},
"correctness": {
"noUnusedVariables": "error"
},
"style": {
"useImportType": "error",
"useExportType": "error"
}
}
}
}
类型感知的代码检查:
// Biome 检测未使用的变量
const unused = 123; // ❌ 错误
// 强制使用类型导入
import { User } from './types'; // ❌ 错误
import type { User } from './types'; // ✅ 正确
// 检测不安全的类型断言
const num = "123" as any as number; // ⚠️ 警告
Biome 在 Monorepo 中表现优异:
my-monorepo/
├── biome.json (根配置)
├── packages/
│ ├── web/
│ │ └── biome.json (继承根配置)
│ ├── api/
│ │ └── biome.json
│ └── shared/
│ └── biome.json
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"extends": [],
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
}
}
{
"extends": ["../../biome.json"],
"formatter": {
"lineWidth": 100
},
"linter": {
"rules": {
"style": {
"noNonNullAssertion": "off"
}
}
}
}
{
"scripts": {
"check": "biome check .",
"check:packages": "biome check packages/*",
"format": "biome format --write .",
"lint": "biome lint packages/*"
}
}
| 工具 | 时间(10,000 个文件) |
|---|---|
| ESLint + Prettier | ~60s |
| Biome | ~0.6s |
在平均工作负载下快 100 倍。
Biome 包含智能缓存:
# 首次运行(无缓存)
biome check . # 1.2s
# 第二次运行(有缓存)
biome check . # 0.1s
# 清除缓存
rm -rf node_modules/.cache/biome
Biome 默认使用所有 CPU 核心:
# 限制 CPU 核心数
biome check --max-diagnostics=50 .
# 详细输出
biome check --verbose .
{
"linter": {
"rules": {
"a11y": {
"recommended": true,
"useButtonType": "error",
"useKeyWithClickEvents": "error"
},
"correctness": {
"useExhaustiveDependencies": "warn",
"useHookAtTopLevel": "error"
},
"suspicious": {
"noArrayIndexKey": "error"
}
}
},
"javascript": {
"formatter": {
"jsxQuoteStyle": "double"
}
}
}
{
"files": {
"ignore": [".next", "out", "node_modules"]
},
"overrides": [
{
"include": ["app/**/*.tsx", "pages/**/*.tsx"],
"linter": {
"rules": {
"a11y": {
"recommended": true
}
}
}
}
]
}
{
"linter": {
"rules": {
"security": {
"recommended": true,
"noGlobalEval": "error"
},
"correctness": {
"noUnusedVariables": "error"
}
}
},
"javascript": {
"formatter": {
"semicolons": "always"
}
}
}
biome check 而不是单独的 format/lint 命令--write 标志以自动修复问题biome ci)# 检查格式化器是否启用
biome rage
# 验证文件未被忽略
biome check --verbose src/file.ts
# 检查 VS Code 扩展日志
# 视图 → 输出 → Biome
// 在 VS Code 设置中禁用 Prettier
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
}
# 移除 Prettier 依赖
npm uninstall prettier
# 检查缓存位置
biome rage
# 清除缓存
rm -rf node_modules/.cache/biome
# 减少最大诊断数
biome check --max-diagnostics=20 .
// 确保类别正确
{
"linter": {
"rules": {
"correctness": { // 类别名称很重要
"noUnusedVariables": "error"
}
}
}
}
来自活跃项目的模式:
ai-code-review/biome.json: files.includes 目标为 src/**/*.ts 并排除测试文件,lineWidth: 100,单引号,始终使用分号,以及 noExplicitAny: warn。itinerizer-ts/biome.json: files.ignore 包括 node_modules、dist、.claude 和数据目录;organizeImports.enabled = true。matsuoka-com 和 diogenes 使用类似的格式化默认值(2 空格缩进,lineWidth 100)。常见脚本:
{
"lint": "biome check src/ --diagnostic-level=error",
"lint:fix": "biome check src/ --write",
"format": "biome format src/ --write"
}
每周安装量
288
仓库
GitHub 星标
18
首次出现
2026 年 1 月 23 日
安全审计
安装于
opencode232
codex225
gemini-cli222
github-copilot215
cursor181
kimi-cli181
Biome is a fast, all-in-one toolchain for web projects written in Rust. It replaces both ESLint and Prettier with a single tool that's 100x faster and provides zero-config defaults.
Key Features :
Installation :
npm install --save-dev @biomejs/biome
# Create biome.json configuration
npx @biomejs/biome init
# Check your project
npx @biomejs/biome check .
# Fix issues automatically
npx @biomejs/biome check --write .
# Format only
npx @biomejs/biome format --write .
# Lint only
npx @biomejs/biome lint .
{
"scripts": {
"check": "biome check .",
"check:write": "biome check --write .",
"format": "biome format --write .",
"lint": "biome lint .",
"lint:fix": "biome lint --write ."
}
}
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": false,
"ignore": ["node_modules", "dist", "build", ".next"]
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 100
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"semicolons": "asNeeded",
"trailingCommas": "all"
}
}
}
The check command runs both linting and formatting:
# Check all files
biome check .
# Fix issues automatically
biome check --write .
# Unsafe fixes (may change behavior)
biome check --write --unsafe .
# Apply suggested fixes
biome check --write --unsafe --apply-suggested
# Check specific files
biome check src/**/*.ts
# CI mode (exit with error on issues)
biome ci .
Format code without linting:
# Format all files
biome format --write .
# Check formatting without changing files
biome format .
# Format specific files
biome format --write src/**/*.{ts,tsx,js,jsx}
# Format stdin
echo "const x={a:1}" | biome format --stdin-file-path=file.js
Lint code without formatting:
# Lint all files
biome lint .
# Fix linting issues
biome lint --write .
# Show rule names
biome lint --verbose .
# Apply unsafe fixes
biome lint --write --unsafe .
{
"formatter": {
"enabled": true,
"formatWithErrors": false,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 80,
"attributePosition": "auto"
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"jsxQuoteStyle": "double",
"quoteProperties": "asNeeded",
"trailingCommas": "all",
"semicolons": "asNeeded",
"arrowParentheses": "always",
"bracketSpacing": true,
"bracketSameLine": false
}
},
"json": {
"formatter": {
"trailingCommas": "none"
}
}
}
{
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"a11y": {
"recommended": true,
"noAutofocus": "error",
"useKeyWithClickEvents": "warn"
},
"complexity": {
"recommended": true,
"noForEach": "off",
"useLiteralKeys": "error"
},
"correctness": {
"recommended": true,
"noUnusedVariables": "error",
"useExhaustiveDependencies": "warn"
},
"performance": {
"recommended": true,
"noAccumulatingSpread": "warn"
},
"security": {
"recommended": true,
"noDangerouslySetInnerHtml": "error"
},
"style": {
"recommended": true,
"noNonNullAssertion": "warn",
"useConst": "error",
"useTemplate": "warn"
},
"suspicious": {
"recommended": true,
"noExplicitAny": "warn",
"noArrayIndexKey": "error"
}
}
}
}
{
"files": {
"ignore": [
"node_modules",
"dist",
"build",
".next",
"coverage",
"*.min.js",
"public/assets/**"
],
"ignoreUnknown": false,
"include": ["src/**/*.ts", "src/**/*.tsx"]
}
}
{
"overrides": [
{
"include": ["**/*.test.ts", "**/*.spec.ts"],
"linter": {
"rules": {
"suspicious": {
"noExplicitAny": "off"
}
}
}
},
{
"include": ["scripts/**/*.js"],
"formatter": {
"lineWidth": 120
}
}
]
}
# Install from VS Code marketplace
code --install-extension biomejs.biome
.vscode/settings.json){
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit",
"source.organizeImports.biome": "explicit"
}
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit",
"source.organizeImports.biome": "explicit"
}
},
"[typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true
},
"biome.lspBin": "./node_modules/@biomejs/biome/bin/biome"
}
{
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.defaultFormatter": "biomejs.biome",
"biome.rename": true,
"files.autoSave": "onFocusChange"
}
# Remove ESLint and Prettier
npm uninstall eslint prettier eslint-config-prettier \
eslint-plugin-react eslint-plugin-import \
@typescript-eslint/parser @typescript-eslint/eslint-plugin
# Remove configuration files
rm .eslintrc.js .eslintrc.json .prettierrc .prettierignore
Use Biome's migration tool:
# Migrate from Prettier config
biome migrate prettier --write
# Migrate from ESLint config
biome migrate eslint --write
Prettier → Biome Formatter :
// .prettierrc (old)
{
"semi": false,
"singleQuote": true,
"trailingComma": "all",
"printWidth": 100
}
// biome.json (new)
{
"formatter": {
"lineWidth": 100
},
"javascript": {
"formatter": {
"semicolons": "asNeeded",
"quoteStyle": "single",
"trailingCommas": "all"
}
}
}
ESLint → Biome Linter :
// .eslintrc.json (old)
{
"rules": {
"no-unused-vars": "error",
"prefer-const": "warn"
}
}
// biome.json (new)
{
"linter": {
"rules": {
"correctness": {
"noUnusedVariables": "error"
},
"style": {
"useConst": "warn"
}
}
}
}
{
"scripts": {
"lint": "biome lint .",
"lint:fix": "biome lint --write .",
"format": "biome format --write .",
"check": "biome check --write ."
}
}
# Install dependencies
npm install --save-dev husky lint-staged
npx husky init
.husky/pre-commit :
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npx lint-staged
package.json :
{
"lint-staged": {
"*.{js,ts,jsx,tsx,json}": [
"biome check --write --no-errors-on-unmatched"
]
}
}
lefthook.yml :
pre-commit:
commands:
lint:
glob: "*.{js,ts,jsx,tsx,json}"
run: biome check --write --no-errors-on-unmatched {staged_files}
.git/hooks/pre-commit :
#!/bin/bash
# Get staged files
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -E '\.(js|ts|jsx|tsx|json)$')
if [ -n "$STAGED_FILES" ]; then
echo "Running Biome on staged files..."
npx @biomejs/biome check --write --no-errors-on-unmatched $STAGED_FILES
# Add formatted files back to staging
git add $STAGED_FILES
fi
name: Biome CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
biome:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run Biome CI
run: npx @biomejs/biome ci .
- name: Check formatting
run: npx @biomejs/biome format .
- name: Lint
run: npx @biomejs/biome lint .
biome:
image: node:20-alpine
stage: test
script:
- npm ci
- npx @biomejs/biome ci .
cache:
paths:
- node_modules/
only:
- merge_requests
- main
version: 2.1
jobs:
biome:
docker:
- image: cimg/node:20.11
steps:
- checkout
- restore_cache:
keys:
- deps-{{ checksum "package-lock.json" }}
- run: npm ci
- save_cache:
paths:
- node_modules
key: deps-{{ checksum "package-lock.json" }}
- run: npx @biomejs/biome ci .
workflows:
test:
jobs:
- biome
Biome includes built-in import sorting:
# Organize imports
biome check --write --organize-imports-enabled=true .
Configuration :
{
"organizeImports": {
"enabled": true
}
}
Example :
// Before
import { useState } from 'react';
import axios from 'axios';
import { Button } from './components/Button';
import type { User } from './types';
import './styles.css';
// After (sorted)
import type { User } from './types';
import axios from 'axios';
import { useState } from 'react';
import { Button } from './components/Button';
import './styles.css';
Biome has first-class TypeScript support:
{
"linter": {
"rules": {
"suspicious": {
"noExplicitAny": "warn",
"noUnsafeDeclarationMerging": "error"
},
"correctness": {
"noUnusedVariables": "error"
},
"style": {
"useImportType": "error",
"useExportType": "error"
}
}
}
}
Type-aware linting :
// Biome detects unused variables
const unused = 123; // ❌ Error
// Enforces type imports
import { User } from './types'; // ❌ Error
import type { User } from './types'; // ✅ Correct
// Detects unsafe type assertions
const num = "123" as any as number; // ⚠️ Warning
Biome works great in monorepos:
my-monorepo/
├── biome.json (root config)
├── packages/
│ ├── web/
│ │ └── biome.json (extends root)
│ ├── api/
│ │ └── biome.json
│ └── shared/
│ └── biome.json
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"extends": [],
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
}
}
{
"extends": ["../../biome.json"],
"formatter": {
"lineWidth": 100
},
"linter": {
"rules": {
"style": {
"noNonNullAssertion": "off"
}
}
}
}
{
"scripts": {
"check": "biome check .",
"check:packages": "biome check packages/*",
"format": "biome format --write .",
"lint": "biome lint packages/*"
}
}
| Tool | Time (10,000 files) |
|---|---|
| ESLint + Prettier | ~60s |
| Biome | ~0.6s |
100x faster on average workloads.
Biome includes intelligent caching:
# First run (no cache)
biome check . # 1.2s
# Second run (with cache)
biome check . # 0.1s
# Clear cache
rm -rf node_modules/.cache/biome
Biome uses all CPU cores by default:
# Limit CPU cores
biome check --max-diagnostics=50 .
# Verbose output
biome check --verbose .
{
"linter": {
"rules": {
"a11y": {
"recommended": true,
"useButtonType": "error",
"useKeyWithClickEvents": "error"
},
"correctness": {
"useExhaustiveDependencies": "warn",
"useHookAtTopLevel": "error"
},
"suspicious": {
"noArrayIndexKey": "error"
}
}
},
"javascript": {
"formatter": {
"jsxQuoteStyle": "double"
}
}
}
{
"files": {
"ignore": [".next", "out", "node_modules"]
},
"overrides": [
{
"include": ["app/**/*.tsx", "pages/**/*.tsx"],
"linter": {
"rules": {
"a11y": {
"recommended": true
}
}
}
}
]
}
{
"linter": {
"rules": {
"security": {
"recommended": true,
"noGlobalEval": "error"
},
"correctness": {
"noUnusedVariables": "error"
}
}
},
"javascript": {
"formatter": {
"semicolons": "always"
}
}
}
biome check instead of separate format/lint commands--write flag for automatic fixesbiome ci) in continuous integration# Check if formatter is enabled
biome rage
# Verify file is not ignored
biome check --verbose src/file.ts
# Check VS Code extension logs
# View → Output → Biome
# Disable Prettier in VS Code settings
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
}
# Remove Prettier dependencies
npm uninstall prettier
# Check cache location
biome rage
# Clear cache
rm -rf node_modules/.cache/biome
# Reduce max diagnostics
biome check --max-diagnostics=20 .
// Ensure correct category
{
"linter": {
"rules": {
"correctness": { // Category name matters
"noUnusedVariables": "error"
}
}
}
}
Patterns from active projects:
ai-code-review/biome.json: files.includes targets src/**/*.ts and excludes tests, lineWidth: 100, single quotes, semicolons always, and noExplicitAny: warn.itinerizer-ts/biome.json: files.ignore includes node_modules, dist, .claude, and data directories; organizeImports.enabled = true.Common scripts:
{
"lint": "biome check src/ --diagnostic-level=error",
"lint:fix": "biome check src/ --write",
"format": "biome format src/ --write"
}
Weekly Installs
288
Repository
GitHub Stars
18
First Seen
Jan 23, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode232
codex225
gemini-cli222
github-copilot215
cursor181
kimi-cli181
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
106,200 周安装
matsuoka-com and diogenes use similar formatting defaults (2-space indent, lineWidth 100).