Skip to content

Fix docs TypeScript 7 compatibility - #6625

Merged
thomhurst merged 1 commit into
mainfrom
agent/fix-docs-typescript-7
Aug 17, 2026
Merged

Fix docs TypeScript 7 compatibility#6625
thomhurst merged 1 commit into
mainfrom
agent/fix-docs-typescript-7

Conversation

@thomhurst

Copy link
Copy Markdown
Owner

Summary

  • replace the inherited Docusaurus TypeScript config because it still uses the removed baseUrl option
  • preserve Docusaurus compiler settings with TypeScript 7-compatible paths mappings
  • import React's exported JSX namespace instead of relying on the removed global namespace
  • allow the benchmark highlight component's declared return type to include null

Root cause

TypeScript 7 rejects baseUrl, including when inherited from @docusaurus/tsconfig. React 19 types also expose JSX through React instead of the global namespace.

Validation

  • yarn install --frozen-lockfile
  • yarn typecheck
  • yarn build

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Caution

Review failed

An error occurred during the review process. Please try again later.


Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Aug 17, 2026

Copy link
Copy Markdown

Greptile Summary

The PR updates the documentation project for TypeScript 7 and React 19 compatibility.

  • Replaces the inherited Docusaurus tsconfig with explicit TypeScript 7-compatible compiler options and path mappings.
  • Imports React’s exported JSX namespace in components with explicit JSX return or property types.
  • Allows BenchmarkHighlight’s declared return type to reflect its existing null loading state.

Confidence Score: 5/5

The 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.

Important Files Changed

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

@claude

claude Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

Summary: Docs-only change fixing TypeScript 7 / React 19 compatibility:

  • docs/tsconfig.json drops the removed baseUrl option (previously inherited from @docusaurus/tsconfig) and inlines the equivalent compiler options explicitly, adding a "*": ["./*"] paths entry to preserve non-relative resolution behavior that baseUrl used to provide. Verified against the actual @docusaurus/tsconfig@3.10.2 package contents — the inlined options match exactly (minus baseUrl).
  • Several components switch from the removed global JSX namespace to React 19's exported type JSX from 'react'. Verified React default imports are still used where combined with type JSX (e.g. React.CSSProperties in ChooseYourJourney), so no unused-import risk.
  • BenchmarkHighlight's return type widened from JSX.Element to JSX.Element | null — this matches the component's existing (pre-existing) early-return null behavior during the loading state, so it's a genuine type-accuracy fix rather than a behavior change.

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).

@thomhurst
thomhurst merged commit 9370628 into main Aug 17, 2026
11 of 15 checks passed
@thomhurst
thomhurst deleted the agent/fix-docs-typescript-7 branch August 17, 2026 16:23
This was referenced Aug 18, 2026
This was referenced Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant