简介
Lefthook 是 Go 编写的极速 Git Hooks 管理器,GitHub 5,000+ stars。并行运行 linter、格式化和测试,启动仅 5ms。替代 Husky + lint-staged。适合需要快速可靠 pre-commit 检查的团队。
Blazing-fast Git hooks manager written in Go. Run linters, formatters, and tests on git commit/push in parallel. Zero-dependency single binary. Replaces Husky + lint-staged. 5,000+ stars.
这里应该同时让用户和 Agent 知道第一步该复制什么、安装什么、落到哪里。
npm install lefthook --save-dev
npx lefthook install# lefthook.yml
pre-commit:
parallel: true
commands:
lint:
glob: "*.{ts,tsx}"
run: npx biome check {staged_files}Lefthook 是 Go 编写的极速 Git Hooks 管理器,GitHub 5,000+ stars。并行运行 linter、格式化和测试,启动仅 5ms。替代 Husky + lint-staged。适合需要快速可靠 pre-commit 检查的团队。
Created by Evil Martians. Licensed under MIT.
lefthook — stars 5,000+