Repository navigation
Expand file tree
/
Copy pathknip.jsonc
More file actions
63 lines (63 loc) · 2.75 KB
/
Copy pathknip.jsonc
File metadata and controls
63 lines (63 loc) · 2.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{
"$schema": "https://unpkg.com/knip@5/schema-jsonc.json",
"treatConfigHintsAsErrors": true,
// apps/protspace is a Python (uv) workspace member bridged into turbo via a thin
// package.json; it has no JS/TS graph for knip to analyze.
"ignoreWorkspaces": ["apps/protspace"],
"workspaces": {
".": {
// Perf Playwright specs are not auto-discovered (perf playwright.config.ts
// sits in a non-default location), so list them explicitly. Docs config is
// listed because Knip does not infer `docs/.vitepress/*`.
// The cross-language bundle contract suite lives outside every package
// (it spans packages/core, packages/utils and the Python producer), so it
// has to be rooted here or knip cannot see what it imports — and reports
// the reader/conversion internals it pins as unused exports.
"entry": [
// Roots only. Globbing every file under scripts/ made each one its own
// entry, so knip could never report anything there as unused.
"scripts/docs-screenshots/*.spec.ts",
"docs/.vitepress/config.mts",
"perf/**/*.spec.ts",
"tests/contract/**/*.test.ts",
],
"project": [
"config/**/*.ts",
"scripts/**/*.ts",
"perf/**/*.ts",
"docs/.vitepress/**/*.{ts,mts}",
"tests/contract/**/*.ts",
],
},
"packages/core": {
// Both entries (src/index.ts, src/components/publish/index.ts) are discovered from
// package.json `exports`, whose dist/ paths map back to src/ through tsconfig `rootDir`;
// listing them again trips config-hint errors.
"project": ["src/**/*.ts"],
},
"packages/utils": {
// `src/index.ts` is plugin-discovered; duplicating it trips config-hint errors.
"project": ["src/**/*.ts"],
},
"apps/web": {
// Keep the runtime graph rooted from App and layer Playwright specs on top.
"entry": ["src/App.tsx", "tests/**/*.spec.ts"],
"project": ["src/**/*.{ts,tsx}", "tests/**/*.ts"],
// Playwright 1.57.0 crashes when loaded via jiti (knip's config loader)
// due to a __dirname usage bug in playwright/lib/index.js:51.
// The specs are already captured via the entry glob above, so disabling
// this plugin loses nothing.
"playwright": false,
// Tailwind v4 is CSS-first: `tailwindcss` and `tailwindcss-animate`
// are referenced via `@import`/`@plugin` in src/index.css, which Knip
// does not scan, so it wrongly reports them as unused.
"ignoreDependencies": ["tailwindcss", "tailwindcss-animate"],
"ignore": [
"src/custom-elements.d.ts",
// shadcn/ui components export complete sets by convention
"src/components/ui/**",
],
},
},
"ignoreExportsUsedInFile": false,
}