Skip to content

Commit 24aac15

Browse files
authored
chore: ✂️ implement Knip (#484)
1 parent 28526d6 commit 24aac15

File tree

5 files changed

+1297
-9
lines changed

5 files changed

+1297
-9
lines changed

.github/workflows/test.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,14 @@ jobs:
6060
env:
6161
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
6262
- run: npm run lint-package
63+
64+
knip:
65+
name: Lint unused code
66+
runs-on: ubuntu-latest
67+
steps:
68+
- uses: actions/checkout@v5
69+
- uses: actions/setup-node@v5
70+
with:
71+
node-version: 22
72+
- run: npm ci --ignore-scripts --no-audit --no-fund
73+
- run: npm run knip

knip.config.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import type { KnipConfig } from 'knip'
2+
3+
const config: KnipConfig = {
4+
entry: ['src/index.ts'],
5+
project: ['src/**/*.ts'],
6+
ignoreDependencies: ['prettier'],
7+
}
8+
9+
export default config

0 commit comments

Comments
 (0)