Files
shadcn/app/tsconfig.json
zeekayandHanzo Dev 511edddbbd ci: make the type check and build actually pass (16 errors -> 0)
The CI added yesterday has never gone green. Three separate causes, all real —
nothing here suppresses a check.

1. Bare specifiers had no mapping. `types/nav` and `types/unist` are imported
   as bare specifiers and only ever resolved via an implicit project root.
   The obvious fix is `baseUrl`, and it is wrong: TypeScript 7 REMOVED the
   option and says so itself —

     TS5102: Option baseUrl has been removed. Please remove it from your
             configuration. Use "paths": {"*": ["./*"]} instead.

   So the mapping is explicit in `paths`, which resolves relative to the
   tsconfig and needs no baseUrl. This also cleared every TS7006 implicit-any
   error, because those were downstream: an unresolved module widens to `any`,
   and mapping over `any` reports each parameter separately. 8 errors, one
   cause.

2. ai-voice.tsx re-declared Web Speech types that lib.dom now ships. Inside
   `declare global` a re-declaration MERGES with the built-in rather than
   shadowing it, so every difference is an error: `readonly` vs mutable
   (TS2687), a second `[index: number]` (TS2374), and `error: string` against
   the real `SpeechRecognitionErrorCode` union (TS2717). Removed the four the
   platform provides; kept the vendor `webkit*` aliases and the constructor,
   which it still does not.

3. CI built one hardcoded package instead of the app dependency graph, so both
   the typecheck and the Build job failed on
   `Cannot find module @hanzo/event` / `Module not found: Can't resolve @hanzo/event`.
   @hanzo/event resolves to the workspace copy, whose package.json points types
   at ./dist/index.d.ts, and nothing built it. Now `turbo run build
   --filter=@hanzo/ui-web^...` — the set is derived from the workspace graph, so
   it stays correct when an import is added rather than needing another name
   pasted in.

Verified locally: app typecheck 16 errors -> 0, and pkgs/ui `tc` is already 0
against its own tsconfig.build.json (my first reading of 92 was me running the
wrong tsconfig).

Not fixed here: the Lint job, whose log simply ENDS mid `pnpm install` at
"Packages: +2770". That is a killed job, not a lint failure, and it needs the
runner looked at rather than the code.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-28 02:58:51 -07:00

61 lines
1.5 KiB
JSON

{
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"target": "ES2022",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"incremental": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "react-jsx",
// `types/nav` and `types/unist` are imported as BARE specifiers, which only
// ever resolved because of an implicit project root. Under TypeScript 7
// `baseUrl` is gone outright — the compiler answers TS5102 "Option 'baseUrl'
// has been removed … use '\"paths\": {\"*\": [\"./*\"]}' instead" — so the
// mapping has to be explicit. `paths` entries resolve relative to this file,
// so no baseUrl is needed or accepted.
"paths": {
"@/*": [
"./*"
],
"types/*": [
"./types/*"
]
},
"plugins": [
{
"name": "next"
}
]
},
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
".next/dev/types/**/*.ts"
],
"exclude": [
"node_modules",
"./scripts/build-registry.mts",
".source/**",
"__registry__/**",
"registry/default/example/cards/**",
"registry/colors.ts",
"registry/v4/**",
"components/pager.tsx",
"lib/rehype-component.ts"
]
}