From 72adec51b407b6f86de74d9a7ad14be85951960c Mon Sep 17 00:00:00 2001 From: PalmDevs Date: Sat, 25 Nov 2023 16:02:55 +0700 Subject: [PATCH] chore: configure lefthook to work --- lefthook.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lefthook.yml b/lefthook.yml index d691082..6dfade6 100755 --- a/lefthook.yml +++ b/lefthook.yml @@ -1,16 +1,12 @@ pre-commit: parallel: true commands: - types: - files: git diff --name-only @{push} - glob: '*.{js,ts}' - run: bunx tsc --noEmit {files} format: - files: git diff --name-only @{push} - glob: '*.{js,ts}' - run: bunx prettier --check {files} + files: git diff --name-only --cached --diff-filter=AM @{push} + glob: '*.{js,ts,json,yml,md}' + run: bunx prettier --ignore-path .gitignore --check {files} lint: - files: git diff --name-only @{push} + files: git diff --name-only --cached --diff-filter=AM @{push} glob: '*.{js,ts}' run: bunx eslint --cache {files} commit-msg: