Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

knip.jsonc

121 lines5.2 KB

1{
2 "$schema": "https://unpkg.com/knip@6/schema.json",
3 // Exported types are part of our contracts even before they have consumers.
4 "rules": { "types": "off", "nsTypes": "off" },
5 // These executables are supplied by the OS or installed separately from npm.
6 "ignoreBinaries": ["eas", "file", "mkfifo", "pkill", "pkg-config", "plutil", "sips"],
7 "workspaces": {
8 ".": {
9 // Keep vendored reference repositories outside the root project.
10 "project": ["*.{js,mjs,cjs,ts,mts,cts}", ".github/**/*.cjs"],
11 "entry": [
12 // CodeRabbit loads its configuration by filename.
13 ".coderabbit.config.ts",
14 ".github/scripts/thread-transfer-report.cjs",
15 ],
16 "vite": { "entry": [".github/**/*.test.cjs"] },
17 "vitest": { "entry": [".github/**/*.test.cjs"] },
18 },
19 "scripts": {
20 // Knip loads its preprocessor through a CLI option; native verification and
21 // worktree setup (from t3.json) run directly.
22 "entry": ["knip-schemas.ts", "mobile-native-client.ts", "setup-worktree.ts"],
23 // The `t3` npm package's files: copied into the package, never imported.
24 "ignore": ["npm-launcher/**"],
25 },
26 "apps/server": {
27 // Vite+ pack entries and the launcher used by installed background services.
28 "entry": [
29 "src/bin.ts!",
30 "src/claude-history-worker.ts!",
31 "scripts/cli.ts",
32 "scripts/evaluate-thread-titles.ts",
33 "scripts/measure-pr-preview.ts",
34 "scripts/probe-claude-fork-local-rollback-replay.ts",
35 "scripts/update-test-shard-weights.ts",
36 "scripts/verify-background-live.ts",
37 "src/provider/testFixtures/*.mjs",
38 ],
39 // Keep the transitive Effect runtime pinned for standalone npm installs.
40 // The Vite+ web build prerequisite.
41 // Native and disk-loaded provider packages stay external to the bundle; the
42 // CLI archive and desktop sidecar stage them from this manifest.
43 "ignoreDependencies": ["@effect/platform-node-shared", "@t3tools/web", "@napi-rs/keyring"],
44 },
45 "apps/desktop": {
46 // Electron loads these bundles by filename rather than importing them.
47 "entry": [
48 "gnome-extension/extension.js!",
49 "src/electron/WindowsForegroundFocusWorker.ts!",
50 "src/snapShot/GlobalShiftShortcutWorker.ts!",
51 "src/snapShot/RegionSnapShotWorker.ts!",
52 "src/snapShot/SnapShotAccessibilityWorker.ts!",
53 "src/boot.ts!",
54 "src/compileCache.ts!",
55 "src/main.ts!",
56 "src/preload.ts!",
57 "src/preview-pick-preload.ts!",
58 "src/preview-pip-preload.ts!",
59 "src/mac-permission-preload.ts!",
60 "src/preview/Annotation.css!",
61 ],
62 // The injected runtime resolves Playwright by string; release tooling runs
63 // electron-builder from this workspace, outside its package scripts.
64 "ignoreDependencies": ["playwright-core", "electron-builder"],
65 },
66 "apps/web": {
67 // Vitest loads this through the per-file @vitest-environment directive.
68 "ignoreDependencies": ["jsdom"],
69 // Worktree setup (scripts/setup-worktree.ts) runs this directly.
70 "entry": ["scripts/warm-dep-cache.ts"],
71 // UI component modules are copied and adapted as cohesive sets. Keep their
72 // named subcomponents even before they have callers; the file audit still
73 // reports an entire component module when nothing imports it.
74 "ignoreIssues": { "src/components/ui/*.tsx": ["exports", "nsExports", "duplicates"] },
75 },
76 "apps/mobile": {
77 // Expo loads plugins and the fingerprint config by string; Metro embeds the browser entry in the native WebView.
78 "entry": [
79 "index.ts!",
80 "fingerprint.config.js",
81 "plugins/*.cjs",
82 "scripts/generate-device-stream.mts",
83 "src/features/devices/device-stream.browser.ts!",
84 "src/features/browser/preview-stream.browser.ts!",
85 ],
86 // Fonts are configured as asset paths; Expo autolinks the native packages.
87 "ignoreDependencies": [
88 "@expo-google-fonts/dm-sans",
89 "@t3tools/mobile-review-diff-native",
90 "@t3tools/mobile-terminal-native",
91 ],
92 },
93 "apps/mobile/modules/t3-source-text": {
94 // React Native codegen discovers component specifications by filename.
95 "entry": ["src/*NativeComponent.ts!"],
96 },
97 "infra/relay": {
98 "entry": ["alchemy.run.ts!", "src/persistence/schema.ts!"],
99 },
100 "packages/*": {
101 // These workspace packages are private to this monorepo.
102 "includeEntryExports": true,
103 },
104 "packages/effect-acp": {
105 "includeEntryExports": true,
106 "entry": ["test/fixtures/*.ts"],
107 // Generated upstream protocol definitions are retained as a complete set.
108 "ignoreIssues": { "src/_generated/**": ["exports", "types"] },
109 },
110 "packages/effect-codex-app-server": {
111 "includeEntryExports": true,
112 "entry": ["test/fixtures/*.ts"],
113 "ignoreIssues": { "src/_generated/**": ["exports", "types"] },
114 },
115 "packages/source-control-github": {
116 // graphqlgen reads its config; the generated operations export every selection's class.
117 "entry": ["graphql.config.ts"],
118 "ignoreIssues": { "**/*.graphql.ts": ["exports", "types", "namespaceMembers"] },
119 },
120 },