Skip to content

Instantly share code, notes, and snippets.

View clemlatz's full-sized avatar

Clément Latzarus clemlatz

View GitHub Profile
@clemlatz
clemlatz / pre-commit-eslint
Last active January 11, 2018 11:20 — forked from linhmtran168/pre-commit-eslint
Pre-commit hook to check for Javascript using ESLint
#!/bin/bash
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".jsx\{0,1\}$")
if [ "$STAGED_FILES" = "" ]; then
exit 0
fi
PASS=true