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

knip.jsonc

188 lines7.9 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 ".github/scripts/pr-limits.cjs",
16 ],
17 "vite": { "entry": [".github/**/*.test.cjs"] },
18 "vitest": { "entry": [".github/**/*.test.cjs"] },
19 },
20 "evals": {
21 // The grader loads these answers by path, as the server loads a definitions file.
22 "entry": ["workflow-authoring/fixtures/*.ts"],
23 },
24 "scripts": {
25 // Knip loads its preprocessor through a CLI option; native verification and
26 // worktree setup (from t3.json) run directly. release-desktop.yml bundles the
27 // Windows verify script with esbuild through a path knip does not trace,
28 // electron-builder loads the macOS signer and the Linux afterPack hook by path, and mobile-e2e.ts runs
29 // agent-device's CLI by path, and mobile-behavior.ts spawns its runner by path.
30 // release-desktop.yml runs the desktop launch check through xvfb-run, which knip
31 // does not trace.
32 "entry": [
33 // These fixture scripts are injected into a browser page by path.
34 "fixtures/*/*.js",
35 "knip-schemas.ts",
36 "linux-after-pack.ts",
37 "mobile-behavior/run.ts",
38 "mobile-native-client.ts",
39 // e2e loads its config and the scenarios by path, and starts the app script.
40 "e2e.config.ts",
41 "prove-scenario.ts",
42 "scenarios/*.ts",
43 "setup-worktree.ts",
44 "sign-macos.ts",
45 "prepare-server-compile-cache.cjs",
46 "smoke-desktop-app.ts",
47 "verify-windows-desktop-artifact.ts",
48 ],
49 "ignoreDependencies": ["esbuild"],
50 // The `t3` npm package's files: copied into the package, never imported.
51 // knip-schemas.test.ts writes a throwaway project to .knip-test-*, which a
52 // knip run beside it in check:changed must not report.
53 "ignore": ["npm-launcher/**", ".knip-test-*/**"],
54 },
55 "apps/server": {
56 // Vite+ pack entries and the launcher used by installed background services.
57 "entry": [
58 "src/bin.ts!",
59 "src/claude-history-worker.ts!",
60 "src/process-launcher.ts!",
61 "scripts/cli.ts",
62 "scripts/fetch-expo-schema.ts",
63 "scripts/probe-claude-fork-local-rollback-replay.ts",
64 "scripts/update-test-shard-weights.ts",
65 "scripts/verify-background-live.ts",
66 "src/provider/testFixtures/*.mjs",
67 // graphqlgen reads its config.
68 "graphql.config.ts",
69 ],
70 // The generated operations export every selection's class.
71 "ignoreIssues": { "**/*.graphql.ts": ["exports", "types", "namespaceMembers"] },
72 // Keep the transitive Effect runtime pinned for standalone npm installs.
73 // The Vite+ web build prerequisite.
74 // Native and disk-loaded provider packages stay external to the bundle; the
75 // CLI archive and desktop sidecar stage them from this manifest.
76 "ignoreDependencies": [
77 "@effect/platform-node-shared",
78 "@t3tools/web",
79 "@napi-rs/keyring",
80 "ffi-rs",
81 "transcribe-cpp",
82 ],
83 },
84 "apps/desktop": {
85 // Electron loads these bundles by filename rather than importing them.
86 "entry": [
87 "gnome-extension/extension.js!",
88 "src/backend/DesktopBackendRecoveryWorker.ts!",
89 "src/electron/WindowsForegroundFocusWorker.ts!",
90 "src/snapShot/GlobalShiftShortcutWorker.ts!",
91 "src/snapShot/RegionSnapShotWorker.ts!",
92 "src/snapShot/SnapShotAccessibilityWorker.ts!",
93 "src/boot.ts!",
94 "src/compileCache.ts!",
95 "src/serverCompileCache.ts!",
96 "src/main.ts!",
97 "src/preload.ts!",
98 "src/preview-pick-preload.ts!",
99 "src/preview-pip-preload.ts!",
100 "src/mac-permission-preload.ts!",
101 "src/preview/Annotation.css!",
102 ],
103 // The injected runtime resolves Playwright by string; release tooling runs
104 // electron-builder from this workspace, outside its package scripts.
105 "ignoreDependencies": ["playwright-core", "electron-builder"],
106 },
107 "apps/web": {
108 // Worktree setup (scripts/setup-worktree.ts) runs this directly, and evidence
109 // fixtures run under node.
110 "entry": ["scripts/warm-dep-cache.ts", "test/fixtures/**/*.mjs"],
111 // UI component modules are copied and adapted as cohesive sets. Keep their
112 // named subcomponents even before they have callers; the file audit still
113 // reports an entire component module when nothing imports it.
114 "ignoreIssues": { "src/components/ui/*.tsx": ["exports", "nsExports", "duplicates"] },
115 },
116 "apps/marketing": {
117 // `astro check` runs from the typecheck task in vite.config.ts, which knip does not read.
118 "ignoreDependencies": ["@astrojs/check"],
119 },
120 "apps/mobile": {
121 // Expo loads plugins and the fingerprint config by string; Metro embeds the browser entry in the native WebView.
122 "entry": [
123 "index.ts!",
124 "fingerprint.config.js",
125 "plugins/*.cjs",
126 "scripts/generate-device-stream.mts",
127 "src/features/devices/device-stream.browser.ts!",
128 "src/features/browser/preview-stream.browser.ts!",
129 ],
130 // Fonts are configured as asset paths; Expo autolinks the native packages.
131 "ignoreDependencies": [
132 "@expo-google-fonts/dm-sans",
133 "@t3tools/mobile-review-diff-native",
134 "@t3tools/mobile-terminal-native",
135 ],
136 },
137 "apps/mobile/modules/t3-highlights": {
138 // Nitrogen discovers HybridObject specifications by filename.
139 "entry": ["src/*.nitro.ts!"],
140 },
141 "apps/mobile/modules/t3-source-text": {
142 // React Native codegen discovers component specifications by filename.
143 "entry": ["src/*NativeComponent.ts!"],
144 },
145 "infra/task-cache": {
146 "ignore": ["vendor/**"],
147 // The bootstrap and Vite+ hook are loaded by shell/package configuration.
148 "entry": [
149 "alchemy.run.ts!",
150 "scripts/install.ts",
151 "scripts/install-ci.ts",
152 "src/runHook.ts",
153 "src/flush.ts",
154 "src/nativeRunHook.js",
155 "src/preload.mjs",
156 ],
157 },
158 "infra/relay": {
159 // Alchemy loads src/worker.ts as the Worker entry and reads its default export.
160 "entry": ["alchemy.run.ts!", "src/persistence/schema.ts!", "src/worker.ts!"],
161 },
162 "packages/*": {
163 // These workspace packages are private to this monorepo.
164 "includeEntryExports": true,
165 },
166 "packages/effect-acp": {
167 "includeEntryExports": true,
168 "entry": ["test/fixtures/*.ts"],
169 // Generated upstream protocol definitions are retained as a complete set.
170 "ignoreIssues": { "src/_generated/**": ["exports", "types"] },
171 },
172 "packages/effect-codex-app-server": {
173 "includeEntryExports": true,
174 "entry": ["test/fixtures/*.ts"],
175 "ignoreIssues": { "src/_generated/**": ["exports", "types"] },
176 },
177 "packages/issue-tracker-linear": {
178 // graphqlgen reads its config; the generated operations export every selection's class.
179 "entry": ["graphql.config.ts"],
180 "ignoreIssues": { "**/*.graphql.ts": ["exports", "types", "namespaceMembers"] },
181 },
182 "packages/source-control-github": {
183 // graphqlgen reads its config; the generated operations export every selection's class.
184 "entry": ["graphql.config.ts", "scripts/measure-pr-preview.ts"],
185 "ignoreIssues": { "**/*.graphql.ts": ["exports", "types", "namespaceMembers"] },
186 },
187 },