DEV Community

Discussion on: Git hook is the excellent alternative to Husky

Collapse
 
slackerzz profile image
Lorenzo

As someone else already said, husky uses git-hooks under the hood.
The main point is that when working in a team husky let you share the pre-commit hook with your team since it's in the repo,v defined in the package.json.
Going with your solution will require to share an additional file. I've used that in the past but I can assure you that not every team member will set up the pre-commit hook manually.
With husky it's automatic.

Collapse
 
krzysztofkaczy9 profile image
Krzysztof Kaczyński

Lorenzo, please check an example which I added to this article. The team member only has to run npm install this will trigger npm postisntall which will set up git-gooks automatically. I think that every developer after downloading JavaScript project with npm will run npm install before he starts to work with this code

Collapse
 
slackerzz profile image
Lorenzo

Sorry, i missed that part 😅 (i read the post and replied with my little son climbing on me)