mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-06-15 23:43:06 +03:00
The `client/` workspace was never type-checked: the existing typecheck
job only covered `packages/` and `api/`, and Vite/esbuild transpiles
without type-checking, so type errors shipped through every CI gate.
- Add a `typecheck` job to frontend-review.yml running `tsc --noEmit`
over `client/` (zero tolerance), reusing the data-provider +
client-package build artifacts. Triggers on `client/**`,
`packages/client/**`, `packages/data-provider/**`.
- Fix all 168 pre-existing client type errors this surfaced (source +
tests), including genuine latent bugs:
- `getFileConfig()` was typed as merged `FileConfig`, but the server
returns the raw config that `mergeFileConfig()` consumes (`TFileConfig`).
- SidePanel/Agents `Retrieval`/`ImageVision` were bound to `AgentForm`
but use the assistants `Capabilities` enum → `AssistantForm`.
- `useSearchResultsByTurn` read a `sources` field its type lacked.
- Removed orphaned dead code: `Artifacts/Mermaid.tsx` (imported a
never-installed dep) and dead barrel re-exports (`./Plugins`, `./MCPAuth`).
- Narrow `client/tsconfig.json` to the client app (drop `../e2e` and
`../config/translations`, which reference backend/tooling modules) so
the gate's scope matches its trigger.
No `any`/`@ts-ignore`/`as unknown as`. Localized newly-surfaced strings.
37 lines
1018 B
JSON
37 lines
1018 B
JSON
{
|
|
"compilerOptions": {
|
|
"target": "ESNext",
|
|
"useDefineForClassFields": true,
|
|
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
|
"allowJs": true,
|
|
"skipLibCheck": true,
|
|
"esModuleInterop": true,
|
|
"allowSyntheticDefaultImports": true,
|
|
"strict": true,
|
|
"forceConsistentCasingInFileNames": false,
|
|
"module": "ESNext",
|
|
"moduleResolution": "bundler",
|
|
"resolveJsonModule": true,
|
|
"isolatedModules": true,
|
|
"noImplicitAny": false,
|
|
"noEmit": true,
|
|
"jsx": "preserve",
|
|
"paths": {
|
|
"~/*": ["./src/*"],
|
|
"test/*": ["./test/*"],
|
|
"*": ["./*", "../../node_modules/*"],
|
|
"librechat-data-provider/*": ["../packages/data-provider/*"]
|
|
}
|
|
},
|
|
"types": ["node", "jest", "@testing-library/jest-dom"],
|
|
"exclude": ["node_modules", "vite.config.ts"],
|
|
"include": [
|
|
"src/**/*",
|
|
"test/**/*",
|
|
"test/setupTests.js",
|
|
"env.d.ts",
|
|
"../packages/client/src/hooks/useDelayedRender.tsx",
|
|
"../packages/client/src/components/InfoHoverCard.tsx"
|
|
]
|
|
}
|