Skip to content

Instantly share code, notes, and snippets.

@ptasker
Created May 10, 2017 18:24
Show Gist options
  • Save ptasker/18827dced81c36bae2c75df9d44c5d53 to your computer and use it in GitHub Desktop.
Save ptasker/18827dced81c36bae2c75df9d44c5d53 to your computer and use it in GitHub Desktop.
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