DEV Community

Discussion on: What are some useful npm packages I might not know about?

 
rhymes profile image
rhymes • Edited

Yeah it does, just did a quick test:


$ git diff package.json
+    "precommit": "rails test"
$ git commit -am "Added precommit hook to run rails tests"                                                             
  husky > npm run -s precommit (node v8.6.0)

Not going to keep rails test before each commit obviously but we now know it works :D

Thread Thread
 
damcosset profile image
Damien Cosset

Very cool! Thank you!

Thread Thread
 
niketpathak89 profile image
Niket Pathak

Husky does really facilitate creating git hooks. I prefer linting the code before committing, so for those who want to lint on precommit git hook digitalfortress.tech/tricks/lint-o...