diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f4b2d0b..902ed60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,5 +24,8 @@ jobs: - name: Install dependencies run: yarn + - name: Typecheck + run: yarn typecheck + - name: Build run: yarn build diff --git a/docusaurus.config.js b/docusaurus.config.js index 0f2ff01..2d7151f 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -186,8 +186,7 @@ const config = { plugins: [ [ require.resolve('@easyops-cn/docusaurus-search-local'), - /** @type {import('@easyops-cn/docusaurus-search-local').PluginOptions} */ - ({ + { hashed: true, language: ['en'], docsRouteBasePath: '/', @@ -196,7 +195,7 @@ const config = { highlightSearchTermsOnTargetPage: true, searchResultLimits: 10, searchBarShortcutHint: false, - }), + }, ], [ '@docusaurus/plugin-pwa', diff --git a/package.json b/package.json index 119e9e3..4be149c 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "@docusaurus/tsconfig": "^3.7.0", "@docusaurus/types": "^3.7.0", "@types/react": "^19.0.0", - "typescript": "~5.8.0" + "typescript": "~7.0.2" }, "browserslist": { "production": [ diff --git a/src/components/HomepageFeatures/index.tsx b/src/components/HomepageFeatures/index.tsx index 91ef460..4f63e9d 100644 --- a/src/components/HomepageFeatures/index.tsx +++ b/src/components/HomepageFeatures/index.tsx @@ -1,11 +1,11 @@ -import React from 'react'; +import React, {type ReactNode} from 'react'; import clsx from 'clsx'; import styles from './styles.module.css'; type FeatureItem = { title: string; Svg: React.ComponentType>; - description: JSX.Element; + description: ReactNode; }; const FeatureList: FeatureItem[] = [ @@ -55,7 +55,7 @@ function Feature({title, Svg, description}: FeatureItem) { ); } -export default function HomepageFeatures(): JSX.Element { +export default function HomepageFeatures(): ReactNode { return (
diff --git a/src/pages/404.tsx b/src/pages/404.tsx index c973143..1cd38c4 100644 --- a/src/pages/404.tsx +++ b/src/pages/404.tsx @@ -1,9 +1,9 @@ -import React from 'react'; +import React, {type ReactNode} from 'react'; import Layout from '@theme/Layout'; import Link from '@docusaurus/Link'; import styles from './404.module.css'; -export default function NotFound(): JSX.Element { +export default function NotFound(): ReactNode { return (