You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My current pre-commit hook looks like this: "pre-commit": "yarn version --no-git-tag-version --new-version \"$(gitversion -showvariable MajorMinorPatch)\" && lint-staged",
Problem:
During commit, all changes are commited as expected and then package.json version is updated, which forces to make another commit. (We can do git amend when code was not pushed, but this not always obvious)
Expected:
I need ability to tell the "pre-commit" to exit with error, or do "exit 1" when "yarn version" actually changes the files on disk.
When the version is the same, the package.json contents will not be changed, and this should not throw any error.
The text was updated successfully, but these errors were encountered:
My current pre-commit hook looks like this:
"pre-commit": "yarn version --no-git-tag-version --new-version \"$(gitversion -showvariable MajorMinorPatch)\" && lint-staged",
Problem:
During commit, all changes are commited as expected and then
package.json
version is updated, which forces to make another commit. (We can do git amend when code was not pushed, but this not always obvious)Expected:
The text was updated successfully, but these errors were encountered: