mirror of
https://github.com/acedanger/finance.git
synced 2025-12-05 22:50:12 -08:00
1.1 KiB
1.1 KiB
Git Hooks
This project uses Git hooks to enforce code quality standards. The hooks are managed using Husky.
Pre-commit Hook
The pre-commit hook runs automatically before each commit and performs the following checks:
- Runs Biome checks (
npm run check) to ensure code formatting and linting standards are met
Usage
The hook runs automatically when you commit changes:
git add .
git commit -m "Your commit message"
If the code doesn't pass the Biome checks, the commit will be rejected with an error message.
Bypassing the Hooks
In rare cases when you need to bypass the pre-commit hooks (not recommended for regular use), you can use the --no-verify flag:
git commit -m "Your commit message" --no-verify
Warning: Bypassing hooks should be done only in exceptional circumstances. It's better to fix code quality issues than to bypass the checks.
Adding New Hooks
To add additional Git hooks:
- Create a new script in the
.huskydirectory - Make it executable:
chmod +x .husky/your-hook-name - Update this documentation to include information about the new hook