Husky
ELI5 — The Vibe Check
Husky manages Git hooks in your Node.js project. Pre-commit? Pre-push? It sets them up so everyone on the team gets the same hooks automatically when they install deps. No more 'it works on my machine' because someone forgot to set up their hooks.
Real Talk
Husky is a tool for managing Git hooks in JavaScript projects. It automatically installs hooks during npm install, ensuring all contributors run the same pre-commit, pre-push, and commit-msg scripts. Integrates with lint-staged and commitlint for automated code quality enforcement.
Show Me The Code
# .husky/pre-commit
npx lint-staged
# .husky/commit-msg
npx commitlint --edit $1
When You'll Hear This
"Husky runs lint-staged on every commit — no unlinted code gets through." / "New developers get hooks automatically when they run npm install."
Related Terms
Commitlint
Commitlint is the grammar police for your commit messages. Try to commit with 'asdf fixed stuff'? Rejected.
Git Hooks
Git Hooks are scripts that Git runs at specific moments — before commit, after push, before merge. They're like event listeners for your version control.
Lint-Staged
Lint-Staged runs linters only on files you're about to commit, not the entire project. Changed 3 files? Lint those 3.
Pre-Commit Hooks
Pre-commit hooks are scripts that run automatically before every Git commit.