diff --git a/docs/src/components/AssertionsLibrary/index.tsx b/docs/src/components/AssertionsLibrary/index.tsx index 51104999539..5f600c2ebe6 100644 --- a/docs/src/components/AssertionsLibrary/index.tsx +++ b/docs/src/components/AssertionsLibrary/index.tsx @@ -1,4 +1,4 @@ -import React, { useState, useMemo } from 'react'; +import React, { type JSX, useState, useMemo } from 'react'; import styles from './styles.module.css'; interface Assertion { diff --git a/docs/src/components/BenchmarkChart/index.tsx b/docs/src/components/BenchmarkChart/index.tsx index c419878c752..b520ba2883d 100644 --- a/docs/src/components/BenchmarkChart/index.tsx +++ b/docs/src/components/BenchmarkChart/index.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from 'react'; +import React, { type JSX, useEffect, useState } from 'react'; import styles from './styles.module.css'; interface BenchmarkData { diff --git a/docs/src/components/BenchmarkHighlight/index.tsx b/docs/src/components/BenchmarkHighlight/index.tsx index dfa636e0f3b..1f4bbdae6d6 100644 --- a/docs/src/components/BenchmarkHighlight/index.tsx +++ b/docs/src/components/BenchmarkHighlight/index.tsx @@ -1,8 +1,8 @@ -import React, { useEffect, useState } from 'react'; +import React, { type JSX, useEffect, useState } from 'react'; import Link from '@docusaurus/Link'; import styles from './styles.module.css'; -export default function BenchmarkHighlight(): JSX.Element { +export default function BenchmarkHighlight(): JSX.Element | null { const [speedups, setSpeedups] = useState(null); useEffect(() => { diff --git a/docs/src/components/ChooseYourJourney/index.tsx b/docs/src/components/ChooseYourJourney/index.tsx index 3b33bf0f0ad..60bfe719de8 100644 --- a/docs/src/components/ChooseYourJourney/index.tsx +++ b/docs/src/components/ChooseYourJourney/index.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { type JSX } from 'react'; import Link from '@docusaurus/Link'; import styles from './styles.module.css'; diff --git a/docs/src/components/HomepageFeatures/index.tsx b/docs/src/components/HomepageFeatures/index.tsx index fd4aebd2077..2368985ad6e 100644 --- a/docs/src/components/HomepageFeatures/index.tsx +++ b/docs/src/components/HomepageFeatures/index.tsx @@ -1,4 +1,5 @@ import clsx from 'clsx'; +import type {JSX} from 'react'; import Heading from '@theme/Heading'; import CodeBlock from '@theme/CodeBlock'; import styles from './styles.module.css'; diff --git a/docs/src/pages/index.tsx b/docs/src/pages/index.tsx index 9a9e3ba9215..c33b7678b95 100644 --- a/docs/src/pages/index.tsx +++ b/docs/src/pages/index.tsx @@ -1,6 +1,7 @@ import Link from '@docusaurus/Link'; import Layout from '@theme/Layout'; import {Highlight, themes} from 'prism-react-renderer'; +import type {JSX} from 'react'; import styles from './index.module.css'; diff --git a/docs/tsconfig.json b/docs/tsconfig.json index 314eab8a418..dac9467018d 100644 --- a/docs/tsconfig.json +++ b/docs/tsconfig.json @@ -1,7 +1,19 @@ { // This file is not used in compilation. It is here just for a nice editor experience. - "extends": "@docusaurus/tsconfig", + // Keep in sync with @docusaurus/tsconfig, which still uses the removed baseUrl option. "compilerOptions": { - "baseUrl": "." + "allowJs": true, + "esModuleInterop": true, + "jsx": "preserve", + "target": "ES2022", + "lib": ["ES2022", "DOM"], + "moduleResolution": "bundler", + "module": "esnext", + "noEmit": true, + "paths": { + "@site/*": ["./*"], + "*": ["./*"] + }, + "skipLibCheck": true } }