typicode / husky

Git hooks made easy 🐶 woof!
https://typicode.github.io/husky
MIT License
31.68k stars 996 forks source link

Docs for optional install of Husky #1386

Closed ArtFlag closed 3 months ago

ArtFlag commented 3 months ago

Hi, thanks for this great tool.

I don't know if it should be a docs update in this repo, or npm/yarn but here's my suggestion/question:

In the context of a public repo, I would like to make my hooks optional to most, and only require them for core maintainers. How can I do this in the latest version with the latest version of yarn, ideally.

Would removing husky related entries from scripts and asking people to run yarn dlx husky do the trick?

typicode commented 3 months ago

Would removing husky related entries from scripts and asking people to run yarn dlx husky do the trick?

Exactly :) I don't know exactly about yarn but with npm it would be npx husky

ArtFlag commented 3 months ago

ok that did the trick. I'll let you be the judge of whether this should be in the docs, but at least we have the procedure here 🙂