I think the whole point of using husky is for anyone who clones the repo to have the hooks auto created (and stay up to date with whatever is confgured in package.json) without having to take the extra steps of creating links/scripts under .git.
It works the same for git-hooks after you clone the repo and run npm install your hooks will be ready for you. You can check this repository for example: git-hooks-example. After you clone this repo and run npm install and try to commit sth which doesn't fit my linter rules you will get an error if linter won't be able to auto-fix errors
Check my custom git-hooks directory and npm postinstall in packages.json.
I think the whole point of using husky is for anyone who clones the repo to have the hooks auto created (and stay up to date with whatever is confgured in package.json) without having to take the extra steps of creating links/scripts under .git.
It works the same for
git-hooks
after you clone the repo and runnpm install
your hooks will be ready for you. You can check this repository for example: git-hooks-example. After you clone this repo and runnpm install
and try to commit sth which doesn't fit my linter rules you will get an error if linter won't be able to auto-fix errorsVery nice! I didn't know you could do that