I love it when bots make our lives easier. In this case, it’s not a robot but a friendly doggo. Husky listens for Git hooks, such as pre-commit
or pre-push
, and performs the tasks you define (like linting, formatting, or running tests) before proceeding.
Best of all, these hooks are shared in the repository, so the commands run not only when you push or commit but also when any of your teammates do.
Check out how to set up Husky and find examples for PHP and JavaScript here:
Do you use Husky? Has it saved you from committing code with errors? Let me know!