Skip to content

Instantly share code, notes, and snippets.

View jamesaduke's full-sized avatar
🎯
Focusing

James Aduke jamesaduke

🎯
Focusing
View GitHub Profile
@jamesaduke
jamesaduke / commit-msg
Created March 2, 2018 05:53 — forked from wesbos/commit-msg
ESLint 3.0 Git Pre Commit Hook
#!/bin/bash
files=$(git diff --cached --name-only | grep '\.jsx\?$')
# Prevent ESLint help message if no files matched
if [[ $files = "" ]] ; then
exit 0
fi
failed=0
for file in ${files}; do