We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa65dfb commit 44460e0Copy full SHA for 44460e0
scripts/ci/husky/pre-commit.js
@@ -47,9 +47,9 @@ function createMemoizedMicromatchMatcher(patterns = []) {
47
}
48
49
async function preCommit() {
50
- const stagedFiles = (await run(`git diff --name-only --cached`)).split('\n');
+ const stagedFiles = (await run('git diff --name-only --cached')).split('\n');
51
const deletedFiles = new Set(
52
- (await run(`git ls-files --deleted`)).split('\n')
+ (await run('git diff --name-only --staged --diff-filter=D')).split('\n')
53
);
54
const matcher = createMemoizedMicromatchMatcher(GENERATED_FILE_PATTERNS);
55
0 commit comments