Skip to content

With the new v7 way of configuring hooks, what is the point ? #1040

Answered by typicode
LexouDuck asked this question in Q&A
Discussion options

You must be logged in to vote

The downside of git config ... is that it will go below package.json and modify the repo it's in.

So I'm still using husky in my projects because it prevents the following two cases:

  1. It happened that users went in node_modules and run npm install on dependencies inside (for quick tests). With bare git config core.hooksPath, the root project could have its hook path modified, creating a complicated to debug issue.
  2. Projects on GitHub can be downloaded as zip or tar files. If they're extracted in another Git repo, the same issue can happen.

Also there's more logging which can help people that are not familiar with Git hooks (which can be the case in Open Source projects where many people f…

Replies: 5 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@typicode
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@LexouDuck
Comment options

@typicode
Comment options

@tran-simon
Comment options

Answer selected by typicode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants