biome-lint-format

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Biome Lint Format

Biome 代码检查与格式化

Set up Biome with a consistent workflow and minimal friction.
搭建具备一致工作流、低摩擦的Biome环境。

Workflow

工作流程

  1. Confirm project context:
  • Package manager
  • JavaScript/TypeScript scope
  • Keep ESLint/Prettier or migrate fully
  • Need Tailwind CSS directive support
  • Need pre-commit hooks
  1. Install Biome and create baseline configuration.
  2. Add project scripts for lint/format/check/ci flows.
  3. Configure editor integration (VS Code) if requested.
  4. Add optional pre-commit checks with Husky + lint-staged if requested.
  5. If migrating from ESLint + Prettier, remove old config carefully and run a first auto-fix pass.
  6. Validate setup by running check commands and confirming CI command behavior.
  1. 确认项目上下文:
  • 包管理器类型
  • JavaScript/TypeScript项目范围
  • 保留ESLint/Prettier还是完全迁移
  • 是否需要Tailwind CSS指令支持
  • 是否需要提交前钩子
  1. 安装Biome并创建基础配置文件。
  2. 添加用于代码检查/格式化/校验/CI流程的项目脚本。
  3. 若有需求,配置编辑器集成(VS Code)。
  4. 若有需求,通过Husky + lint-staged添加可选的提交前检查。
  5. 若从ESLint + Prettier迁移,小心移除旧配置并运行首次自动修复。
  6. 运行校验命令并确认CI命令行为,以验证搭建是否成功。

Reference Map

参考映射

Load only the reference needed for the current request:
  • references/setup.md
    Use for installation, baseline
    biome.json
    , scripts, VS Code setup, pre-commit setup, and command examples.
  • references/migration.md
    Use only when migrating from ESLint + Prettier or running a hybrid temporary setup.
  • references/troubleshooting.md
    Use for config detection issues, editor conflicts, schema/version mismatches, and performance tuning.
  • references/rule-customization.md
    Use only when the user asks for concrete rule customizations.
仅加载当前请求所需的参考内容:
  • references/setup.md
    用于安装、基础
    biome.json
    配置、脚本、VS Code设置、提交前钩子配置及命令示例。
  • references/migration.md
    仅在从ESLint + Prettier迁移或运行临时混合配置时使用。
  • references/troubleshooting.md
    用于配置检测问题、编辑器冲突、schema/版本不匹配及性能调优。
  • references/rule-customization.md
    仅在用户要求具体规则自定义时使用。

Guardrails

约束规则

  • Keep
    SKILL.md
    short and procedural; store details in references.
  • Use
    biome check
    as the default all-in-one command.
  • Do not claim Biome replaces
    tsc
    type checking.
  • 保持
    SKILL.md
    简洁且流程化;详细内容存储在参考文档中。
  • 使用
    biome check
    作为默认的一站式命令。
  • 不得声称Biome可替代
    tsc
    类型检查。