javascript-precommit
v0.0.8
Published
Installs git precommit hook for running checks & lints before git commit. Inspired by https://github.com/nlf/precommit-hook
Downloads
15
Readme
Installs git precommit hook for running lints & checks before git commit.
Usage
- Make sure your
.git
dir is on the same path aspackage.json
. In other words, they share the same parent folder. Usually it is so. - Edit your
package.json
, addprecommit: <what to do>
, e.g.
{
"name": "My package.json",
"precommit": "gulp lint"
}
- npm i javascript-precommit
Now every git commit will run gulp lint
task and only pass if the task is successful.