aboutsummaryrefslogtreecommitdiffstats
path: root/.husky
diff options
context:
space:
mode:
authorLibravatar Vijay A <vraravam@users.noreply.github.com>2021-10-30 07:43:12 +0530
committerLibravatar Vijay A <vraravam@users.noreply.github.com>2021-10-30 07:43:12 +0530
commit05f4ab929ebe4a7db85358e27ba9c9639c1525e4 (patch)
tree5603d2b87597dd7103f8c8ccaecd2b6a56c270f3 /.husky
parentUpgrade the Node package `pg` to at least 8.0.3 (diff)
downloadferdium-server-05f4ab929ebe4a7db85358e27ba9c9639c1525e4.tar.gz
ferdium-server-05f4ab929ebe4a7db85358e27ba9c9639c1525e4.tar.zst
ferdium-server-05f4ab929ebe4a7db85358e27ba9c9639c1525e4.zip
Do not error out if husky has not been installed. Ignore .husky folder from Docker context
Diffstat (limited to '.husky')
-rwxr-xr-x.husky/pre-commit9
1 files changed, 7 insertions, 2 deletions
diff --git a/.husky/pre-commit b/.husky/pre-commit
index 20d0d06..1a92cb3 100755
--- a/.husky/pre-commit
+++ b/.husky/pre-commit
@@ -1,4 +1,9 @@
1#!/bin/sh 1#!/bin/sh
2. "$(dirname "$0")/_/husky.sh"
3 2
4npm run lint 3FILE_NAME="$(dirname "$0")/_/husky.sh"
4
5# Conditionally invoke so as to avoid running npm commands if this is a clean checkout (ie before installing npm modules)
6if [ -f $FILE_NAME ]; then
7 . $FILE_NAME
8 npm run lint
9fi