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

knip.jsonc

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