Fix docs TypeScript 7 compatibility - #6625
Conversation
|
Caution Review failedAn error occurred during the review process. Please try again later. Comment |
Greptile SummaryThe PR updates the documentation project for TypeScript 7 and React 19 compatibility.
Confidence Score: 5/5The PR appears safe to merge, with no concrete functional, build, or security defects identified in the changed code. The changes align explicit JSX annotations with React 19’s exported namespace and replace the removed TypeScript option while retaining the module, JSX, library, and Docusaurus alias settings needed by the documentation project.
|
| Filename | Overview |
|---|---|
| docs/tsconfig.json | Replaces the Docusaurus config inheritance and removed baseUrl option with explicit compiler settings and TypeScript 7-compatible aliases; no concrete regression was established. |
| docs/src/components/AssertionsLibrary/index.tsx | Imports React’s exported JSX type without changing component behavior. |
| docs/src/components/BenchmarkChart/index.tsx | Imports React’s exported JSX type without changing benchmark loading or rendering behavior. |
| docs/src/components/BenchmarkHighlight/index.tsx | Imports React’s JSX type and correctly expands the return annotation to include the component’s existing null state. |
| docs/src/components/ChooseYourJourney/index.tsx | Imports React’s exported JSX type without changing rendered content. |
| docs/src/components/HomepageFeatures/index.tsx | Replaces reliance on the global JSX namespace with a type-only React import. |
| docs/src/pages/index.tsx | Replaces reliance on the global JSX namespace with a type-only React import. |
Reviews (1): Last reviewed commit: "fix(docs): support TypeScript 7" | Re-trigger Greptile
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. Summary: Docs-only change fixing TypeScript 7 / React 19 compatibility:
No CLAUDE.md rules apply here (docs-only change; doesn't touch source-gen/reflection/snapshot testing/AOT paths covered by the repo's critical rules). |
Summary
baseUrloptionpathsmappingsJSXnamespace instead of relying on the removed global namespacenullRoot cause
TypeScript 7 rejects
baseUrl, including when inherited from@docusaurus/tsconfig. React 19 types also exposeJSXthrough React instead of the global namespace.Validation
yarn install --frozen-lockfileyarn typecheckyarn build