Created
October 10, 2016 07:44
-
-
Save tzengerink/417313bb98ffb879732ba8cd9c22ffc3 to your computer and use it in GitHub Desktop.
TSLint pre-commit hook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for file in $(git diff --cached --name-only | grep -E '\.ts$') | |
do | |
git show ":$file" | tslint "$file" | |
if [ $? -ne 0 ]; then | |
exit 1 | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment