Skip to content

Instantly share code, notes, and snippets.

View msiemens's full-sized avatar

Markus Siemens msiemens

View GitHub Profile
@msiemens
msiemens / pre-commit-eslint
Last active October 15, 2016 13:49 — forked from linhmtran168/pre-commit-eslint
Pre-commit hook to check for Javascript using ESLint
#!/bin/sh
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".jsx\{0,1\}$" | grep -Ev ".min.js|/lib/|/vendor/")
if [[ "$STAGED_FILES" = "" ]]; then
exit 0
fi
PASS=true