首页/ AI 技能 / @skilllib/skill-2014279409333645315
Skill站外收录 @skilllib/skill-2014279409333645315

code-formatting

基于 Biome 工具对当前分支中修改过的 JS TS JSON 类文件执行格式化与代码检查,仅处理差异文件,确保符合项目统一编码规范,适用于提交前或 PR 创建时的代码清理。

0.0 (0) 178 次安装 原作者 编程导航
收录于 2026-01-22
测试与安全 AI 技能

Skills.MD

# Code Formatting Format JS/TS/JSON files changed on the current branch using Biome. ## Quick Usage ```bash .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 ```bash .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)

评论 0

还没有评论,来抢沙发。