1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-10 22:00:05 +00:00

chore: pre commit hook

This commit is contained in:
2022-05-10 14:54:34 +02:00
parent 63328163ab
commit 29a65052dc
3 changed files with 5 additions and 4 deletions

12
.git-hooks/pre-commit Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/sh
# Using `--silent` helps for showing any errs in the first line of the response
# The first line is picked up by the VS Code GIT UI popup when rc is not 0
if npm run --silent lint:silent ; then
exit 0
else
npm run --silent lint:fix
echo "❌ Prettier check failed! We ran lint:fix for you. Please add & commit again."
exit 1
fi