360 Secure SkillHub
360 安全技能中心

Biome Config Validator

这是Biome配置文件验证工具,核心功能是校验biome.json的正确性,涵盖结构、lint规则、格式化、最佳实践四类共22条规则,支持全量校验或单独检查结构、规则冲突、弃用项等。典型场景为开发人员排查配置错误,输入为biome.json文件,通过命令行执行,输出支持文本、JSON、摘要三种格式,以不同退出码标识结果状态。

charlie-morrison
charlie-morrison
热度 52.07
最近更新 2026-05-11 17:42:55
分类:开发依赖:代码执行 / 读写文件应用场景:代码审查 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add biome-config-validator
Metadata
name
biome-config-validator
description
Validate and lint Biome (biome.json) configuration files for structure, rule conflicts, deprecated options, and best practices. 22 rules across structure, linting, formatting, and compatibility categories.

Biome Config Validator

Validate biome.json configuration files for correctness, conflicts, deprecated options, and best practices.

Commands

# Validate a biome.json file (all rules)
python3 scripts/biome_config_validator.py lint biome.json

# Check for rule conflicts only
python3 scripts/biome_config_validator.py conflicts biome.json

# Check for deprecated options
python3 scripts/biome_config_validator.py deprecated biome.json

# Validate structure only
python3 scripts/biome_config_validator.py validate biome.json

# JSON output
python3 scripts/biome_config_validator.py lint biome.json --format json

# Summary only
python3 scripts/biome_config_validator.py lint biome.json --format summary

Rules (22)

Structure (5)

  • Invalid JSON syntax
  • Unknown top-level keys
  • Invalid schema version ($schema URL)
  • Missing recommended sections (linter, formatter)
  • Invalid file patterns in includes/excludes

Linting (7)

  • Unknown lint rule names
  • Rules in wrong category
  • Conflicting rules (e.g., useConst vs noConst)
  • Disabled recommended rules without justification
  • Invalid rule severity values
  • Empty rule groups
  • Deprecated rule names

Formatting (5)

  • Invalid indent style/width combination
  • Conflicting formatter settings
  • Line width out of reasonable range
  • Invalid quote style values
  • Tab width mismatch with indent width

Best Practices (5)

  • Missing VCS integration settings
  • Overly broad ignore patterns
  • No organizeImports configuration
  • Missing JavaScript/TypeScript specific settings
  • Extends pointing to non-existent config

Output Formats

  • text (default): Human-readable with colors and severity icons
  • json: Machine-readable with file, rule, severity, message
  • summary: Counts by severity only

Exit Codes

  • 0: No issues (or warnings only)
  • 1: Errors found
  • 2: Invalid input