-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathknip.ts
More file actions
40 lines (35 loc) · 1.86 KB
/
Copy pathknip.ts
File metadata and controls
40 lines (35 loc) · 1.86 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
import type { KnipConfig } from 'knip';
// Workspaces are read from package.json#workspaces (apps/*, packages/*, packages/config/*).
// Plugins (vite, vitest, playwright, tanstack-router, nitro, tailwind, babel, oxlint, bun)
// auto-enable and contribute their own entry/config files — this only fills the gaps.
const config: KnipConfig = {
// shadcn Base UI components are vendored from the registry; their unused variants are
// intentional and we don't hand-author them (matches oxlint's `**/components/ui/**` ignore).
ignore: ['**/components/ui/**'],
// `node:assert` is aliased to the `assert` polyfill in vitest.config.browser.ts
// (@effect/vitest needs it in browser mode) — there's no literal import for knip to see.
ignoreDependencies: ['assert'],
// `nix flake update` (nix:flake:update script) — a system binary, not a package.
ignoreBinaries: ['nix'],
workspaces: {
'.': {
// Maintenance scripts run via `bun scripts/*.ts`; map-calibrate.ts isn't a stage yet.
entry: ['scripts/*.ts'],
},
'packages/extractor': {
// `git sparse-checkout` / `git rev-parse` in scripts/update-paramdex.ts; knip
// mis-reads the git subcommands as standalone binaries.
ignoreBinaries: ['sparse-checkout', 'rev-parse'],
// The pipeline stages are Effect values whose inferred types pull in these internal
// errors/interfaces; with `declaration: true` (tsconfig.base) they must stay exported
// so tsgo can name them in the emitted .d.ts, even though no other file imports them by
// name. knip can't see inferred-type usage, so don't flag in-file-only exports here.
ignoreExportsUsedInFile: true,
},
'packages/save-parser': {
// Vitest benchmark entry — lives in a separate vitest.config.perf.ts the plugin doesn't read.
entry: ['perf/*.bench.ts'],
},
},
};
export default config;