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

knip.jsonc

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