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
Remove husky as a requirement? #11
Comments
Hi Derek, Husky is a pre-commit hook to ensure that new code committed runs through prettier and eslint. I guess you were having some eslint errors? If so, the solution is to fix it, then recommit. Or use Would still prefer it to be there for the template, but I can understand users opting to remove them for their own repos. Let me know what problem you ran into and I will see whether I can replicate / fix it. |
Hi Tim, I mean, sure, I get it -- but isn't the appropriate place for this type of hook to be in some type of automation after the pull request? I'll submit a PR that will let me not have ESLint errors... But fundamentally husky seems like an odd dependency, given that it forces someone to use the command line -- at least if they're a Windows developer like myself using GitHub Desktop. I'm one of those developers who thinks the GUI (GitHub Desktop) is a better choice and never commit from the command line except in case of emergency. The error is related to "cygpath" not being found (because GitHub Desktop doesn't know what that means); the ESLint errors get auto-fixed by running husky: Anyway, I'll close the issue since you're keeping the dependency. No worries. |
Just to follow up in case anybody stumbles on this in Google, GitHub Desktop will work with husky as configured, but only if you've already done npm install (so husky is in PATH locally). There were previously various bugs (on both macOS and GitHub Desktop) with husky not working, but pre-commit hooks like @timlrx has set up for https://github.com/timlrx/tailwind-nextjs-starter-blog/ will work fine:
Cheers! |
Hey @timlrx ,
Do you think it's better to include instructions on using husky or to remove it as a dependency?
I went to commit locally after cloning the template, but I couldn't because husky not being configured threw an error.
That meant I had to pause what I was doing to
npm uninstall husky
-- then commit the package.json & package-lock.json files -- and then commit my actual changes.I'm happy to update your template for whichever solution you think is best.
The text was updated successfully, but these errors were encountered: