Skip to content

Husky no longer working after update back in April #2292

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
trusktr opened this issue Oct 22, 2023 · 3 comments · Fixed by #2325
Closed

Husky no longer working after update back in April #2292

trusktr opened this issue Oct 22, 2023 · 3 comments · Fixed by #2325
Assignees

Comments

@trusktr
Copy link
Member

trusktr commented Oct 22, 2023

Back in April we updated Husky from v3 to v8 due to Dependabot.

This broke our workflow: the git commit hook is no longer installed on a fresh clone with npm install, so we no longer run lint on commit.

Latest Husky requires manually installing hooks with npx husky install.

They recommend that the prepare script can be used to automate this for npm install. But then it runs at random other times like any time the package is being packed, f.e. during publish.

We can, however, make npx husky install be optional: the contributing guide can recommend it as a convenience for pre-pull-request time saving. I like making it opt-in, and those who don't want it can rely on pull request builds or running command manually. Wdyt?

@trusktr
Copy link
Member Author

trusktr commented Oct 22, 2023

cc @Koooooo-7

@Koooooo-7
Copy link
Member

Koooooo-7 commented Oct 22, 2023

Yea, I have to say the github actions is the final gateway for lint check for now.
Update the contributing guide on this is for sure.
And I will try to find a more convenient way in further instead of contributors notice the lint issue after creating PRs.

or, how about downgrade to the older version since we don't need much feats on husky now.

@Koooooo-7
Copy link
Member

Put some docs for usage reminder.
migration from v4-
'.husky/pre-commit' hook not set as executable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants