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

knip.jsonc

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