Created
May 28, 2019 09:54
-
-
Save nsisodiya/0b315b88b9f54f7f67f2bcbda3782f6a 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
#!/usr/bin/env sh | |
EMAIL=$(git config user.email) | |
if [ -z "$EMAIL" ]; then | |
# user.email is empty | |
echo "ERROR: Aborting commit. user.email is missing. \ | |
Configure repo specific user.email for this repository by running: \ | |
'$ git config user.email name@example.com'" | |
exit 1 | |
else | |
# user.email is not empty | |
exit 0 | |
fi |
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
{ | |
"author": "Narendra Sisodiya - narendra.sisodiya@rivigo.com", | |
"husky": { | |
"hooks": { | |
"pre-commit": "npm run fix && git add .", | |
"pre-push": "", | |
"post-merge": "npm install" | |
} | |
}, | |
"dependencies": { | |
}, | |
"devDependencies": { | |
"npm-run-all": "4.1.5", | |
}, | |
"scripts": { | |
"fix": "run-s _exitIfNoEmail _prettier _eslint-fix _eslint", | |
"_exitIfNoEmail": "bash exitIfNoEmail.sh", | |
"_prettier": "prettier --write '**/*.{ts,tsx,js}' --config prettier.config.js", | |
"_eslint-fix": "eslint -c eslintrc.js --fix .", | |
"_eslint": "eslint -c eslintrc.js ." | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment