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

knip.jsonc

124 lines5.3 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/fetch-expo-schema.ts",
34 "scripts/measure-pr-preview.ts",
35 "scripts/probe-claude-fork-local-rollback-replay.ts",
36 "scripts/update-test-shard-weights.ts",
37 "scripts/verify-background-live.ts",
38 "src/provider/testFixtures/*.mjs",
39 // graphqlgen reads its config.
40 "graphql.config.ts",
41 ],
42 // The generated operations export every selection's class.
43 "ignoreIssues": { "**/*.graphql.ts": ["exports", "types", "namespaceMembers"] },
44 // Keep the transitive Effect runtime pinned for standalone npm installs.
45 // The Vite+ web build prerequisite.
46 // Native and disk-loaded provider packages stay external to the bundle; the
47 // CLI archive and desktop sidecar stage them from this manifest.
48 "ignoreDependencies": ["@effect/platform-node-shared", "@t3tools/web", "@napi-rs/keyring"],
49 },
50 "apps/desktop": {
51 // Electron loads these bundles by filename rather than importing them.
52 "entry": [
53 "gnome-extension/extension.js!",
54 "src/electron/WindowsForegroundFocusWorker.ts!",
55 "src/snapShot/GlobalShiftShortcutWorker.ts!",
56 "src/snapShot/RegionSnapShotWorker.ts!",
57 "src/snapShot/SnapShotAccessibilityWorker.ts!",
58 "src/boot.ts!",
59 "src/compileCache.ts!",
60 "src/main.ts!",
61 "src/preload.ts!",
62 "src/preview-pick-preload.ts!",
63 "src/preview-pip-preload.ts!",
64 "src/mac-permission-preload.ts!",
65 "src/preview/Annotation.css!",
66 ],
67 // The injected runtime resolves Playwright by string; release tooling runs
68 // electron-builder from this workspace, outside its package scripts.
69 "ignoreDependencies": ["playwright-core", "electron-builder"],
70 },
71 "apps/web": {
72 // Worktree setup (scripts/setup-worktree.ts) runs this directly.
73 "entry": ["scripts/warm-dep-cache.ts"],
74 // UI component modules are copied and adapted as cohesive sets. Keep their
75 // named subcomponents even before they have callers; the file audit still
76 // reports an entire component module when nothing imports it.
77 "ignoreIssues": { "src/components/ui/*.tsx": ["exports", "nsExports", "duplicates"] },
78 },
79 "apps/mobile": {
80 // Expo loads plugins and the fingerprint config by string; Metro embeds the browser entry in the native WebView.
81 "entry": [
82 "index.ts!",
83 "fingerprint.config.js",
84 "plugins/*.cjs",
85 "scripts/generate-device-stream.mts",
86 "src/features/devices/device-stream.browser.ts!",
87 "src/features/browser/preview-stream.browser.ts!",
88 ],
89 // Fonts are configured as asset paths; Expo autolinks the native packages.
90 "ignoreDependencies": [
91 "@expo-google-fonts/dm-sans",
92 "@t3tools/mobile-review-diff-native",
93 "@t3tools/mobile-terminal-native",
94 ],
95 },
96 "apps/mobile/modules/t3-source-text": {
97 // React Native codegen discovers component specifications by filename.
98 "entry": ["src/*NativeComponent.ts!"],
99 },
100 "infra/relay": {
101 "entry": ["alchemy.run.ts!", "src/persistence/schema.ts!"],
102 },
103 "packages/*": {
104 // These workspace packages are private to this monorepo.
105 "includeEntryExports": true,
106 },
107 "packages/effect-acp": {
108 "includeEntryExports": true,
109 "entry": ["test/fixtures/*.ts"],
110 // Generated upstream protocol definitions are retained as a complete set.
111 "ignoreIssues": { "src/_generated/**": ["exports", "types"] },
112 },
113 "packages/effect-codex-app-server": {
114 "includeEntryExports": true,
115 "entry": ["test/fixtures/*.ts"],
116 "ignoreIssues": { "src/_generated/**": ["exports", "types"] },
117 },
118 "packages/source-control-github": {
119 // graphqlgen reads its config; the generated operations export every selection's class.
120 "entry": ["graphql.config.ts"],
121 "ignoreIssues": { "**/*.graphql.ts": ["exports", "types", "namespaceMembers"] },
122 },
123 },