Skip to content

Commit 6724873

Browse files
committed
Add lint-staged
1 parent e5b1b8d commit 6724873

File tree

3 files changed

+855
-66
lines changed

3 files changed

+855
-66
lines changed

.husky/pre-commit

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
npm test
1+
if [ -z "${DISABLE_PRECOMMIT_LINT}" ]; then
2+
npm run lint-staged
3+
else
4+
echo "Skipping lint due to DISABLE_PRECOMMIT_LINT env var"
5+
fi
6+
7+
if [ -z "${DISABLE_PRECOMMIT_TEST}" ]; then
8+
npm run test
9+
else
10+
echo "Skipping testing due to DISABLE_PRECOMMIT_TEST env var"
11+
fi

0 commit comments

Comments
 (0)