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
npx simple-git-hooks #958
Comments
Hmm it worked for me on the new project so I guess it’s related to the fact that it’s an existing one which probably already has hook setup. Please try removing your hooks by uninstalling husky and then re-run the command. |
Maybe it's the issue mentioned in the readme: |
It happened exactly the same to me too. I just did the same |
1) npx mrm lint-staged 2) npx simple-git-hooks (lint-staged/lint-staged#958) 3) `git config core.hooksPath` should be empty or point to `.git/hooks/`. Otherwise call `git config --unset core.hooksPath` or `git config core.hooksPath .git/hooks/`.
If the project was already set up, this type of change would mean that it would have to be applied on every user's machine. I think this adds a lot of communication overhead and is error-prone. How could this be mitigated so that once a person updates the repo with this change, he can perform all the changes needed and not having to communicate the change to everyone using it? By the way, the command |
Yeah I guess it’s a breaking change and we’re considering moving back to husky but it requires some thinking. Ultimately we need to adjust the mrm package that’s responsible for the installation. |
I think the This seems to work pretty well for a widely-used repo, because it will essentially re-install the hooks every time Now obviously this won't work on library repos that themselves get installed into other repos. |
To be fair with husky v6 there's a similar issue, since it no longer automatically installs the git hooks and you have to separately call |
Description
I have re-run the
npx mrm lint-staged
on the previously setup lint-staged with husky project.When I ran the git commit nothing happened.
Then I went to the
simple-git-hooks
docs and found out that the hooks should be generated first by running thenpx simple-git-hooks
.Is this something that was supposed to happen automatically when running the
npx mrm lint-staged
?If yes, then there's a bug, because it hasn't happened to me.
If no, then the docs should instruct on doing so, however, in this case, how can this be integrated into the project, so that it happens automatically for everyone using the repo where lint staged and simple-git-hooks are applied?
Environment
lint-staged
: 10.5.4The text was updated successfully, but these errors were encountered: