Loading...
Loading...
Compare original and translation side by side
python3 ~/.claude/skills/biome-validator/scripts/validate.py --root .
python3 ~/.claude/skills/biome-validator/scripts/validate.py --root . --strictpython3 ~/.claude/skills/biome-validator/scripts/validate.py --root .
python3 ~/.claude/skills/biome-validator/scripts/validate.py --root . --strict{
"$schema": "https://biomejs.dev/schemas/2.3.12/schema.json"
}{
"$schema": "https://biomejs.dev/schemas/1.9.0/schema.json"
}{
"$schema": "https://biomejs.dev/schemas/2.3.12/schema.json"
}{
"$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"// 符合要求:v2.3+
"@biomejs/biome": "^2.3.0"
// 不符合要求:v1.x 或 v2.0-2.2版本
"@biomejs/biome": "^1.9.0"{
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"suspicious": {
"noExplicitAny": "warn"
}
}
}
}{
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"suspicious": {
"noExplicitAny": "warn"
}
}
}
}{
"assist": {
"actions": {
"source": {
"organizeImports": "on"
}
}
}
}{
"organizeImports": {
"enabled": true
}
}{
"assist": {
"actions": {
"source": {
"organizeImports": "on"
}
}
}
}{
"organizeImports": {
"enabled": true
}
}{
"linter": {
"domains": {
"react": "on",
"next": "on"
}
}
}{
"linter": {
"domains": {
"react": "on",
"next": "on"
}
}
}// biome-ignore lint/suspicious/noExplicitAny: legacy code
// biome-ignore-all lint/style/useConst
// biome-ignore-start lint/complexity
// biome-ignore-end// @ts-ignore // Not Biome
// eslint-disable // Wrong tool// 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 // 工具不匹配{
"linter": {
"rules": {
"correctness": {
"noUndeclaredVariables": "error",
"useAwaitThenable": "error"
}
}
}
}{
"linter": {
"rules": {
"correctness": {
"noUndeclaredVariables": "error",
"useAwaitThenable": "error"
}
}
}
}{
"assist": {
"actions": {
"source": {
"organizeImports": "on",
"useSortedKeys": "on"
}
}
}
}{
"assist": {
"actions": {
"source": {
"organizeImports": "on",
"useSortedKeys": "on"
}
}
}
}{
"linter": {
"domains": {
"react": "on", // React-specific rules
"next": "on", // Next.js rules
"test": "on" // Testing framework rules
}
}
}{
"linter": {
"domains": {
"react": "on", // React特定规则
"next": "on", // Next.js规则
"test": "on" // 测试框架规则
}
}
}{
"$schema": "https://biomejs.dev/schemas/2.3.12/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"
]
}
}{
"$schema": "https://biomejs.dev/schemas/2.3.12/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+) |
|---|---|
| |
| Schema < 2.0 | Schema 2.3.11+ |
| |
| No domains config | Use |
| 已弃用内容 | 替代方案(2.3+版本) |
|---|---|
| |
| 架构版本 < 2.0 | 架构版本 2.3.11+ |
| |
| 无领域配置 | 使用 |
=== 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=== 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 foundbun remove eslint prettier eslint-config-* eslint-plugin-*
bun add -D @biomejs/biome@latestbun remove eslint prettier eslint-config-* eslint-plugin-*
bun add -D @biomejs/biome@latestbunx biome initbunx biome initbunx biome migrate eslint --writebunx 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 ."
}
}{
"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 .prettierignorerm .eslintrc* .prettierrc* .eslintignore .prettierignore// .vscode/settings.json
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "biomejs.biome",
"editor.codeActionsOnSave": {
"source.organizeImports.biome": "explicit",
"quickfix.biome": "explicit"
}
}// .vscode/settings.json
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "biomejs.biome",
"editor.codeActionsOnSave": {
"source.organizeImports.biome": "explicit",
"quickfix.biome": "explicit"
}
}undefinedundefinedundefinedundefinedlinter-formatter-initnextjs-validatorbun-validatorlinter-formatter-initnextjs-validatorbun-validator