Skip to content

Instantly share code, notes, and snippets.

View dim2k2006's full-sized avatar

Dmitry Malofeev dim2k2006

  • Ombori
  • Stockholm, Sweden
View GitHub Profile
@dim2k2006
dim2k2006 / commit-msg
Created June 13, 2017 18:46 — 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