Husky pre-commit not running in Windows

Viewed 481

I have set anything possible up, followed most guides & documentations, but yet - the pre-commit hook does not run.

What I did:

  1. npx husky install

  2. created a file called: ".huskyrc.json"

  3. Wrote to file:

    { "hooks": { "pre-commit": "npm run lint && npm run test:no-watch && npm run format && git add ." } }

By the way, output of: git config --get core.hooksPath is .husky

Please advice? I do git commit -m "test" and nothing happends. It commits it without the hook being run

0 Answers
Related