typicode / husky

Git hooks made easy 🐶 woof!
https://typicode.github.io/husky
MIT License
32.62k stars 1.03k forks source link

How to deal with global/system Git hook. #130

Closed ethyde closed 4 years ago

ethyde commented 7 years ago

Hi,

For some reason i have some Git-Hook installed at global/system level, like this one git-good-commit as commit-msg, this one prepare-commit-msg and a simple .gitmessage template.

In my package.json i have :

"precommit": "npm run eslint",
"eslint": "./node_modules/.bin/eslint -c .eslintrc ./src/ || true"

If i run npm run precommit everythings work well, but when i try to commit something, nothings happen, only normal commit.

I have commented my Global Githook from .gitconfig, try to commit something, but linting still does not start.

What do I do wrong ?

nazreen commented 7 years ago

try checking your .git/hooks/pre-commit file

syropian commented 7 years ago

@nxmohamad How do you run husky precommit scripts alongside an existing .git/hooks/pre-commit file? We have a ruby script doing some things in ours, but I'd also like to run an NPM task.

Graham42 commented 6 years ago

This looks similar to https://github.com/typicode/husky/issues/171 ?

typicode commented 4 years ago

Closing to clean up the issues list but I'm keeping it in mind.