-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathknip.json
More file actions
37 lines (37 loc) · 1.33 KB
/
Copy pathknip.json
File metadata and controls
37 lines (37 loc) · 1.33 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
{
"$schema": "https://unpkg.com/knip@6/schema.json",
// `src/index.ts!` is the published surface: knip cannot see consumer usage,
// so nothing reachable from it is ever dead code.
"entry": [
"src/index.ts!",
"src/**/*.test.ts",
"e2e/config.ts",
// CI runs a copy of this from $RUNNER_TEMP, not the file itself.
"scripts/smoke.js",
// Run by hand to regenerate the compat golden fixtures.
"scripts/generate-compat-golden.js"
],
// The `!` markers split production from dev, which is what makes
// `knip:production` a second lens: source kept alive by tests alone.
"project": [
"src/**/*.ts!",
"src/tests/**/*.ts",
"e2e/**/*.ts",
"scripts/*.js",
"*.{js,cjs,mjs,mts}"
],
"ignoreBinaries": [
// Installed out of band — pipx/brew locally, a container in CI.
"semgrep"
],
// RULE: every entry below must name the mechanism by which the dependency is
// used and knip cannot see it. No such mechanism means it is dead — remove it.
"ignoreDependencies": [
// Reached only through a plugin string:
// `new webpack.ProvidePlugin({ Buffer: ['buffer', 'Buffer'] })`.
"buffer",
// A tripwire, imported by nothing on purpose: its own `preinstall` fails
// the install if `ignore-scripts=true` is ever dropped from `.npmrc`.
"@lavamoat/preinstall-always-fail"
]
}