返回 Skill 列表
extension
分类: 开发与工程无需 API Key

code-formatting

使用Biome格式化当前分支上的代码。在被要求在提交或创建PR之前格式化、检查或清理代码时使用。

person作者: jakexiaohubgithub

Code Formatting

Format JS/TS/JSON files changed on the current branch using Biome.

Quick Usage

.claude/skills/code-formatting/scripts/format-branch.sh

This formats all .js, .ts, .jsx, .tsx, .json, .jsonc files changed compared to main.

Custom Base Branch

.claude/skills/code-formatting/scripts/format-branch.sh develop

What It Does

  1. Finds files changed on current branch vs base branch
  2. Filters to JS/TS/JSON files only
  3. Runs npx biome check --write on those files
  4. Uses same settings as the biome-check.yml CI workflow

Config

Biome config is at biome.jsonc in repo root.

Notes

  • Run from repo root
  • Requires Node.js/npx
  • Only formats changed files (not entire codebase)