From 4525fbe41633b3b9969b2b6308b22ae0798fb737 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Sun, 29 Oct 2023 20:01:32 -0300 Subject: [PATCH] Fix .husky/pre-commit --- .husky/pre-commit | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index a4698b6..979cf92 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,10 +1,10 @@ #!/usr/bin/env sh -pattern=".ts|.tsx|.js$" +pattern="\.ts|\.tsx|\.js$" files=$(git --no-pager diff --cached --name-only | grep -E -e "${pattern}") if [ "$?" = "0" ]; then - npm run prettier -- -c ${files} || exit 1 - npm run eslint -- --exit-on-fatal-error ${files} || exit 1 + npm run prettier -- ${files} || exit 1 + npm run eslint -- --fix --exit-on-fatal-error ${files} || exit 1 git add "${files}" exit 0 else