Skip to content

Instantly share code, notes, and snippets.

@JustinLivi
JustinLivi / commit-msg
Last active September 10, 2015 03:51 — forked from jhartikainen/commit-msg
ESLint git commit hook
#!/bin/bash
git stash -q --keep-index
# Test prospective commit
git diff-index --cached HEAD --name-only --diff-filter ACMR | egrep '.js$' | xargs $(npm bin)/eslint
RESULT=$?
git stash pop -q