You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
17 hours ago | |
---|---|---|
.. | ||
_ | 17 hours ago | |
README.md | 17 hours ago | |
commit-msg | 17 hours ago | |
pre-commit | 17 hours ago | |
pre-push | 2 days ago |
README.md
Husky Git Hooks - Optional Activation
How to Enable Husky Locally
Option 1: Environment Variable (Session Only)
export HUSKY_ENABLED=1
Option 2: Local File (Persistent)
touch .husky-enabled
Option 3: Global Configuration
git config --global husky.enabled true
Available Hooks
- pre-commit: Runs
npm run lint-fix
before commits - commit-msg: Validates commit message format
Disable Hooks
unset HUSKY_ENABLED
rm .husky-enabled
Why This Approach?
- Hooks are committed to git for consistency
- Hooks don't run unless explicitly enabled
- Each developer can choose to use them
- No automatic activation on other systems