biome-validator by gracefullight/stock-checker
npx skills add https://github.com/gracefullight/stock-checker --skill biome-validator验证 Biome 2.3+ 配置并防止使用过时的模式。确保类型感知的代码检查、领域配置和现代 Biome 功能得到正确配置。
python3 ~/.claude/skills/biome-validator/scripts/validate.py --root .
python3 ~/.claude/skills/biome-validator/scripts/validate.py --root . --strict
良好 - Biome 2.3+:
{
"$schema": "https://biomejs.dev/schemas/2.3.11/schema.json"
}
不良 - 旧架构:
{
"$schema": "https://biomejs.dev/schemas/1.9.0/schema.json"
}
// 良好:v2.3+
"@biomejs/biome": "^2.3.0"
// 不良:v1.x 或 v2.0-2.2
"@biomejs/biome": "^1.9.0"
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
良好 - Biome 2.x:
{
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"suspicious": {
"noExplicitAny": "warn"
}
}
}
}
良好 - 使用辅助功能:
{
"assist": {
"actions": {
"source": {
"organizeImports": "on"
}
}
}
}
不良 - 旧的 organizeImports 位置:
{
"organizeImports": {
"enabled": true
}
}
良好 - 为框架特定规则使用领域配置:
{
"linter": {
"domains": {
"react": "on",
"next": "on"
}
}
}
良好 - Biome 2.0+ 注释:
// biome-ignore lint/suspicious/noExplicitAny: legacy code
// biome-ignore-all lint/style/useConst
// biome-ignore-start lint/complexity
// biome-ignore-end
不良 - 错误格式:
// @ts-ignore // 非 Biome
// eslint-disable // 错误工具
Biome 2.0+ 包含类型推断功能,无需 TypeScript 编译器:
{
"linter": {
"rules": {
"correctness": {
"noUndeclaredVariables": "error",
"useAwaitThenable": "error"
}
}
}
}
{
"assist": {
"actions": {
"source": {
"organizeImports": "on",
"useSortedKeys": "on"
}
}
}
}
代码检查规则可以从其他文件查询信息,实现更强大的分析功能。
{
"linter": {
"domains": {
"react": "on", // React 特定规则
"next": "on", // Next.js 规则
"test": "on" // 测试框架规则
}
}
}
{
"$schema": "https://biomejs.dev/schemas/2.3.11/schema.json",
"assist": {
"actions": {
"source": {
"organizeImports": "on"
}
}
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"complexity": {
"noForEach": "off"
},
"style": {
"noNonNullAssertion": "off"
},
"suspicious": {
"noArrayIndexKey": "off",
"noExplicitAny": "warn"
},
"correctness": {
"useAwaitThenable": "error",
"noLeakedRender": "error"
}
},
"domains": {
"react": "on",
"next": "on"
}
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 100
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"trailingCommas": "es5",
"semicolons": "always"
}
},
"files": {
"ignore": [
"node_modules",
"dist",
"build",
".next",
"out",
".cache",
".turbo",
"coverage"
]
}
}
| 已弃用 | 替代方案(2.3+) |
|---|---|
organizeImports.enabled | assist.actions.source.organizeImports |
| 架构 < 2.0 | 架构 2.3.11+ |
@biomejs/biome < 2.3 | @biomejs/biome@latest |
| 无领域配置 | 为框架使用 linter.domains |
=== Biome 2.3+ 验证报告 ===
包版本:@biomejs/biome@2.3.11 ✓
配置:
✓ 架构版本:2.3.11
✓ 代码检查器已启用,使用推荐规则
✓ 使用 assist.actions 处理导入
✗ 未配置领域(考虑启用 react、next)
✓ 格式化器已配置
规则:
✓ noExplicitAny:警告
✓ useAwaitThenable:错误
✗ noLeakedRender 未启用(推荐)
总结:发现 2 个问题
bun remove eslint prettier eslint-config-* eslint-plugin-*
bun add -D @biomejs/biome@latest
bunx biome init
bunx biome migrate eslint --write
{
"scripts": {
"lint": "biome lint .",
"lint:fix": "biome lint --write .",
"format": "biome format --write .",
"check": "biome check .",
"check:fix": "biome check --write ."
}
}
rm .eslintrc* .prettierrc* .eslintignore .prettierignore
// .vscode/settings.json
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "biomejs.biome",
"editor.codeActionsOnSave": {
"source.organizeImports.biome": "explicit",
"quickfix.biome": "explicit"
}
}
# .github/workflows/lint.yml
- name: 验证 Biome 配置
run: |
python3 ~/.claude/skills/biome-validator/scripts/validate.py \
--root . \
--strict \
--ci
- name: 代码检查
run: bunx biome check --error-on-warnings .
linter-formatter-init - 从头开始设置 Biomenextjs-validator - 验证 Next.js(启用 next 领域)bun-validator - 验证 Bun 工作空间每周安装数
121
仓库
GitHub 星标数
12
首次出现
2026年1月27日
安全审计
安装于
opencode110
codex109
gemini-cli107
cursor105
github-copilot103
amp100
Validates Biome 2.3+ configuration and prevents outdated patterns. Ensures type-aware linting, domains, and modern Biome features are properly configured.
python3 ~/.claude/skills/biome-validator/scripts/validate.py --root .
python3 ~/.claude/skills/biome-validator/scripts/validate.py --root . --strict
GOOD - Biome 2.3+:
{
"$schema": "https://biomejs.dev/schemas/2.3.11/schema.json"
}
BAD - Old schema:
{
"$schema": "https://biomejs.dev/schemas/1.9.0/schema.json"
}
// GOOD: v2.3+
"@biomejs/biome": "^2.3.0"
// BAD: v1.x or v2.0-2.2
"@biomejs/biome": "^1.9.0"
GOOD - Biome 2.x:
{
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"suspicious": {
"noExplicitAny": "warn"
}
}
}
}
GOOD - Using assist:
{
"assist": {
"actions": {
"source": {
"organizeImports": "on"
}
}
}
}
BAD - Old organizeImports location:
{
"organizeImports": {
"enabled": true
}
}
GOOD - Using domains for framework-specific rules:
{
"linter": {
"domains": {
"react": "on",
"next": "on"
}
}
}
GOOD - Biome 2.0+ comments:
// biome-ignore lint/suspicious/noExplicitAny: legacy code
// biome-ignore-all lint/style/useConst
// biome-ignore-start lint/complexity
// biome-ignore-end
BAD - Wrong format:
// @ts-ignore // Not Biome
// eslint-disable // Wrong tool
Biome 2.0+ includes type inference without requiring TypeScript compiler:
{
"linter": {
"rules": {
"correctness": {
"noUndeclaredVariables": "error",
"useAwaitThenable": "error"
}
}
}
}
{
"assist": {
"actions": {
"source": {
"organizeImports": "on",
"useSortedKeys": "on"
}
}
}
}
Lint rules can query information from other files for more powerful analysis.
{
"linter": {
"domains": {
"react": "on", // React-specific rules
"next": "on", // Next.js rules
"test": "on" // Testing framework rules
}
}
}
{
"$schema": "https://biomejs.dev/schemas/2.3.11/schema.json",
"assist": {
"actions": {
"source": {
"organizeImports": "on"
}
}
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"complexity": {
"noForEach": "off"
},
"style": {
"noNonNullAssertion": "off"
},
"suspicious": {
"noArrayIndexKey": "off",
"noExplicitAny": "warn"
},
"correctness": {
"useAwaitThenable": "error",
"noLeakedRender": "error"
}
},
"domains": {
"react": "on",
"next": "on"
}
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 100
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"trailingCommas": "es5",
"semicolons": "always"
}
},
"files": {
"ignore": [
"node_modules",
"dist",
"build",
".next",
"out",
".cache",
".turbo",
"coverage"
]
}
}
| Deprecated | Replacement (2.3+) |
|---|---|
organizeImports.enabled | assist.actions.source.organizeImports |
| Schema < 2.0 | Schema 2.3.11+ |
@biomejs/biome < 2.3 | @biomejs/biome@latest |
| No domains config | Use linter.domains for frameworks |
=== Biome 2.3+ Validation Report ===
Package Version: @biomejs/biome@2.3.11 ✓
Configuration:
✓ Schema version: 2.3.11
✓ Linter enabled with recommended rules
✓ Using assist.actions for imports
✗ No domains configured (consider enabling react, next)
✓ Formatter configured
Rules:
✓ noExplicitAny: warn
✓ useAwaitThenable: error
✗ noLeakedRender not enabled (recommended)
Summary: 2 issues found
bun remove eslint prettier eslint-config-* eslint-plugin-*
bun add -D @biomejs/biome@latest
bunx biome init
bunx biome migrate eslint --write
{
"scripts": {
"lint": "biome lint .",
"lint:fix": "biome lint --write .",
"format": "biome format --write .",
"check": "biome check .",
"check:fix": "biome check --write ."
}
}
rm .eslintrc* .prettierrc* .eslintignore .prettierignore
// .vscode/settings.json
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "biomejs.biome",
"editor.codeActionsOnSave": {
"source.organizeImports.biome": "explicit",
"quickfix.biome": "explicit"
}
}
# .github/workflows/lint.yml
- name: Validate Biome Config
run: |
python3 ~/.claude/skills/biome-validator/scripts/validate.py \
--root . \
--strict \
--ci
- name: Lint
run: bunx biome check --error-on-warnings .
linter-formatter-init - Sets up Biome from scratchnextjs-validator - Validates Next.js (enable next domain)bun-validator - Validates Bun workspaceWeekly Installs
121
Repository
GitHub Stars
12
First Seen
Jan 27, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode110
codex109
gemini-cli107
cursor105
github-copilot103
amp100
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
116,600 周安装