Repository navigation
Expand file tree
/
Copy pathknip.json
More file actions
45 lines (45 loc) · 2.41 KB
/
Copy pathknip.json
File metadata and controls
45 lines (45 loc) · 2.41 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
{
"$schema": "https://unpkg.com/knip@6/schema.json",
"entry": ["test/**/*.test.ts", "test/**/*.test-d.ts", "test/packaging/fixtures/*.mjs"],
"project": ["src/**", "test/**"],
// `vercelStegaCleanAll` is a deliberate `@deprecated` alias of `stegaClean`
// (see src/stega/stegaClean.ts), re-exported publicly from src/stega/index.ts.
// It is not a real duplicate, so scope the ignore to that one file rather
// than turning the `duplicates` rule off project-wide.
//
// `_patchObservable`/`_promptObservable` are unused, but not for the usual
// dead-code reason: `ObservableAgentsActionClient` (src/agent/actions/
// AgentActionsClient.ts) implements `generate`/`transform`/`translate` by
// calling their `_xObservable` siblings, but has no `patch`/`prompt`
// methods at all, even though the promise-based `AgentActionsClient` has
// both and `_patchObservable`/`_promptObservable` are ready-made,
// correctly-shaped implementations for them. That looks like an
// unfinished feature rather than leftover code, so Task 15 left it alone
// and flagged it instead of deleting the export or guessing at the wiring.
//
// `ResponseEvent`/`LegacyRequester`/`PromiseRequester` (src/http/
// request.ts) look unused by knip's text-import analysis - nothing
// imports them by name - but they are structurally part of the return
// type of `defineRequester`, which `defineCreateClientExports`
// (src/defineCreateClient.ts, the default export index.ts/index.node.ts
// call to build the public `requester`/`createClient` values) returns.
// De-exporting them compiles fine under `tsc --noEmit` but breaks
// `pnpm build`: the dts bundler needs to name them to emit
// `dist/index.d.ts` and fails with `TS4058: ... cannot be named`.
// Confirmed by trying it - this is a real dts-only usage knip cannot see.
// `webhooks`/`$defs`/`operations` in src/context/types.gen.ts are part of
// openapi-typescript's fixed output shape - the generator always emits
// them, used or not - so the types rule is ignored for that one generated
// file rather than hand-editing its output after every regeneration.
"ignoreIssues": {
"src/context/types.gen.ts": ["types"],
"src/stega/stegaClean.ts": ["duplicates"],
"src/agent/actions/patch.ts": ["exports"],
"src/agent/actions/prompt.ts": ["exports"],
"src/http/request.ts": ["types"]
},
"rules": {
"exports": "error",
"types": "error"
}
}