Skip to content

Instantly share code, notes, and snippets.

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
You can’t perform that action at this time.