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

knip.jsonc

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