Closed pdehaan closed 9 years ago
@pdehaan works for me! I guess I can always grunt lint
if I want to verify syntax before pushing a given commit. Please rebase, then treat yo self by hitting that green button :-)
Rebased and Travis says we're green. Treating myself!
Replacing precommit-hook module with husky so we can remove some sketchy automated JSHint logic included in precommit-hook and convert the hook from "pre-commit" to "pre-push". See https://github.com/mozilla/chronicle/issues/322 for some more context.
This doesn't address the core issue of #322 ("git pre-commit linter should only run on files in the git index"), but should give a slight performance bump (if you like to
git commit
a lot andgit push
a little).How do I even?
To install/test this, I recommend cleaning out any existing git hooks in your ./.git/hooks/ directory that may have been set up by precommit-hook before running
npm install
. The husky npm install will recreate any hooks that it watches (notably "precommit", "prepush", and "postmerge").