Skip to content

Commit d78fb2a

Browse files
committed
Add knip and knip-checks to the template
1 parent a3b6d10 commit d78fb2a

File tree

5 files changed

+43
-2
lines changed

5 files changed

+43
-2
lines changed

.github/workflows/knip-check.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Knip Checks
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: oven-sh/setup-bun@v2
12+
13+
- name: Install dependencies
14+
run: bun install
15+
16+
- name: Run Knip
17+
run: bun run knip

.knip.jsonc

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"$schema": "https://unpkg.com/knip@5/schema.json",
3+
"workspaces": {
4+
".": {
5+
"ignoreDependencies": [
6+
"@turbo/gen"
7+
]
8+
},
9+
"packages/*": {
10+
"ignore": [
11+
"**/*.test.(ts|tsx|mjs|js)"
12+
],
13+
"ignoreDependencies": [
14+
"@swc/cli",
15+
"@swc/core"
16+
]
17+
}
18+
}
19+
}

GUIDEBOOK.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ Since this is a `turborepo` monorepo, you can run some tasks across the repo wit
1818

1919
### Root only tasks:
2020

21-
- `one-version:check` - Check if all dependencies are using the same version
21+
- `one-version:check`
22+
- Check if all dependencies are using the same version
23+
- `knip`
24+
- Run [Knip](https://knip.dev/) across the repo
2225

2326
## Creating new workspaces:
2427

bun.lockb

5.84 KB
Binary file not shown.

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"devDependencies": {
99
"@turbo/gen": "1.13.3",
1010
"dprint": "0.45.0",
11+
"knip": "^5.25.2",
1112
"one-version": "0.2.0",
1213
"turbo": "2.0.6"
1314
},
@@ -21,7 +22,8 @@
2122
"format:check": "dprint check",
2223
"test": "turbo run test",
2324
"generator": "bun ./scripts/generator.ts",
24-
"one-version:check": "one-version check"
25+
"one-version:check": "one-version check",
26+
"knip": "knip"
2527
},
2628
"packageManager": "bun@1.1.17"
2729
}

0 commit comments

Comments
 (0)