Skip to content

Commit 816847c

Browse files
committed
Add Knip check for unused files
1 parent dddac90 commit 816847c

File tree

11 files changed

+361
-944
lines changed

11 files changed

+361
-944
lines changed

.github/workflows/code-qa.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,21 @@ jobs:
2828
- name: Lint
2929
run: npm run lint
3030

31+
knip:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: Checkout code
35+
uses: actions/checkout@v4
36+
- name: Setup Node.js
37+
uses: actions/setup-node@v4
38+
with:
39+
node-version: '18'
40+
cache: 'npm'
41+
- name: Install dependencies
42+
run: npm run install:all
43+
- name: Run knip checks
44+
run: npm run knip
45+
3146
unit-test:
3247
runs-on: ubuntu-latest
3348
steps:

knip.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"$schema": "https://unpkg.com/knip@latest/schema.json",
3+
"entry": ["src/extension.ts", "src/activate/index.ts", "webview-ui/src/index.tsx"],
4+
"project": ["src/**/*.ts", "webview-ui/src/**/*.{ts,tsx}"],
5+
"ignore": [
6+
"**/__mocks__/**",
7+
"**/__tests__/**",
8+
"**/test/**",
9+
"**/*.test.ts",
10+
"**/*.test.tsx",
11+
"**/stories/**",
12+
"coverage/**",
13+
"dist/**",
14+
"out/**",
15+
"bin/**",
16+
"src/activate/**",
17+
"src/exports/**",
18+
"src/extension.ts",
19+
".vscode-test.mjs"
20+
],
21+
"workspaces": {
22+
"webview-ui": {
23+
"entry": ["src/index.tsx"],
24+
"project": ["src/**/*.{ts,tsx}"]
25+
}
26+
}
27+
}

0 commit comments

Comments
 (0)