Skip to content

Instantly share code, notes, and snippets.

@ptasker
Created May 10, 2017 18:24
Embed
What would you like to do?
ESLint pre-commit hook
#!/bin/bash
lint=$(./node_modules/eslint/bin/eslint.js src/**.js $a)
echo $lint
if [[ "$lint" != *""* ]]; then
echo "ERROR: ESLint failed, check hints"
exit 1 # reject
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment