Goal
ใช้งาน Lefthook สำหรับจัดการ Git hooks อย่างมีประสิทธิภาพ
Scope
ใช้สำหรับจัดการ Git hooks อย่างมีประสิทธิภาพ, automate code quality checks, enforce commit message standards, และ run tests ก่อน push
Execute
- ติดตั้ง Lefthook
- Initialize ใน project
- รัน hooks ด้วยตนเอง
- อ่าน
guide/installation.mdสำหรับการติดตั้งและ setup - อ่าน
guide/quick-start.mdสำหรับเริ่มต้นใช้งาน - อ่าน
guide/key-concept.mdสำหรับแนวคิดหลัก - อ่าน
guide/how-it-works.mdสำหรับวิธีการทำงาน - อ่าน
guide/features.mdสำหรับ features ที่มี - อ่าน
guide/patterns.mdสำหรับ patterns ทั่วไป - อ่าน
guide/best-practices.mdสำหรับ best practices - อ่าน
guide/integration.mdสำหรับ tool integration - อ่าน
guide/architecture.mdสำหรับ system architecture - อ่าน
guide/structure.mdสำหรับ project structure - อ่าน
guide/troubleshooting.mdสำหรับปัญหาทั่วไป
Rules
- ใช้
bun add -D lefthookสำหรับติดตั้ง - ใช้
bunx lefthook installสำหรับ initialize - ใช้
bunx lefthook runสำหรับรัน hooks - กำหนด hooks ใน
lefthook.yml - ใช้ backticks สำหรับ commands
- ใช้ code blocks สำหรับ examples
- ใช้ ansi markdown diagrams สำหรับ flow และ architecture
Expected Outcome
- Git hooks ที่ automated
- Code quality ที่ enforced
- Commit messages ที่ standardized
- Tests ที่ run ก่อน push