feat: 配置 git pre-commit hook — 提交前自动运行 Biome 检查

使用 .githooks/ 目录 + core.hooksPath 方案,零依赖。
prepare script 确保 bun install 后自动激活。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
claude-code-best
2026-04-01 01:44:55 +08:00
parent 074ea844dc
commit 4319afc08f
3 changed files with 25 additions and 2 deletions

View File

@@ -15,7 +15,8 @@
"prepublishOnly": "bun run build",
"lint": "biome check src/",
"lint:fix": "biome check --fix src/",
"format": "biome format --write src/"
"format": "biome format --write src/",
"prepare": "git config core.hooksPath .githooks"
},
"dependencies": {
"@alcalzone/ansi-tokenize": "^0.3.0",