Skip to content

Instantly share code, notes, and snippets.

View smartsdesign's full-sized avatar

Samson Muhangi smartsdesign

  • Tide
  • London, England
View GitHub Profile
@wesbos
wesbos / commit-msg
Created July 4, 2016 18:55
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