Skip to content

Commit f2338ea

Browse files
committed
chore(hooks): add knip check to push hook
Add knip dependency check to the push hook to catch unused dependencies before they are pushed to the repository.
1 parent 439e312 commit f2338ea

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

knip.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ export default {
1313
},
1414
ignore: ['**/*.test.ts', '**/*.spec.ts', '**/*.test-d.ts'],
1515
ignoreBinaries: ['only-allow'],
16-
ignoreDependencies: ['@typescript/native-preview'],
16+
ignoreDependencies: ['@typescript/native-preview', 'lefthook'],
1717
rules: {
1818
optionalPeerDependencies: 'off',
19+
devDependencies: 'warn',
1920
},
2021
} satisfies KnipConfig;

lefthook.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,8 @@ pre-commit:
99
glob: '*'
1010
run: bun oxfmt --no-error-on-unmatched-pattern {staged_files}
1111
stage_fixed: true
12+
13+
push:
14+
jobs:
15+
- name: knip
16+
run: pnpm run lint:knip

0 commit comments

Comments
 (0)