Skip to content

Instantly share code, notes, and snippets.

@horatiorosa
horatiorosa / commit-msg
Created January 11, 2021 21:14 — 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