Last active
June 3, 2016 13:21
-
-
Save dmfilipenko/91ef807ce78c46fe86fe673225fa55e9 to your computer and use it in GitHub Desktop.
This file contains 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/sh | |
PASS=true | |
echo "\nElsint Javascript:\n" | |
npm run eslint | |
if [[ "$?" == 0 ]]; then | |
echo "\t\033[32mESLint Passed: $FILE\033[0m" | |
else | |
echo "\t\033[41mESLint Failed: $FILE\033[0m" | |
PASS=false | |
fi | |
echo "\nElsint Javascript:\n" | |
npm run flow | |
if [[ "$?" == 0 ]]; then | |
echo "\t\033[32mFlow Passed\033[0m" | |
else | |
echo "\t\033[41mFlow Failed\033[0m" | |
PASS=false | |
fi | |
echo "\nJavascript validation completed!\n" | |
if ! $PASS; then | |
echo "\t\033[41mCOMMIT FAILED:\033[0m\n" | |
exit 1 | |
else | |
echo "\t\033[42mCOMMIT SUCCEEDED\033[0m\n" | |
fi | |
exit $? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment