-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Improvements to our commit-hook (lint-staged) #3433
Comments
You mean |
To echo my question in #3390 (comment), can we add a kill switch to all of these hooks to optionally disable it? |
Other than |
@ranbena Yes. |
I think you can just remove the relevant files from |
Would that have to happen on individual |
Indeed. Every husky install would bring em back. |
That's not a solution :-) Although I'm not sure if having a solution that permanently disables this makes sense. 🤔 It's either we think it's necessary or we don't. |
@ranbena btw, how about we run tests only on push and linting on commit? Linting should be fast on a few files and almost a no-op, while tests are a bit heavier. |
There is the There is the Both things don't really prevent this from persisting between runs of npm install. |
Since it's overridable anyhow, I don't see a problem with allowing devs to disable it comfortably. If there's a technical way I'd be happy to review such a PR.
It's a trade-off. On pre-push the full suite would have to be run which is a waste. |
I couldn't find an explanation in #3390 why this commit hook is necessary to be honest. Could you elaborate what the advantages are? |
The problem is one of the message it sends: it's either we think it's important or we don't. If we don't, then we can just provide instructions to how to setup hooks for whoever interested instead.
|
FWIW, to reiterate what I said before: it would be great to have this hook not auto-installed and/or a way disable it easily. And no, remembering how to disable commit validation/verification on every commit isn't enough. An example for how this breaks things for me, a screenshot of the Tower Git app that I use to commit things when I want to split changes up into individual commits or have to handle the rebases of our fork: |
Yeah Tower Git has issues with hooks. Have you tried mitigating this? |
This isn't really an issue Tower has, it simply uses a PATH environment variable without the local |
prettier-eslint
for linting and formatting files along with callinggit add
when done.The text was updated successfully, but these errors were encountered: