From 81347df9841fcd6f2b8df7139dd32cd0a2096449 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 2 Oct 2026 09:51:45 +0200 Subject: [PATCH 1/5] refactor: remove unnecessary React imports, add jsxImportSource to tsconfigs (AI-assisted) All JSX goes through the automatic runtime (Babel preset and SWC/Rspack both use runtime: 'automatic'), so `import React` is only needed where the `React` namespace is actually used. - Add "jsxImportSource": "react" to tsconfig.base.json and @docusaurus/tsconfig, so TypeScript resolves JSX types from react/jsx-runtime instead of the in-scope/UMD `React` global. - Codemod: drop the default React import from the 269 files under packages/*/src (233 non-test) that never reference the `React` identifier (TS AST check, comments ignored). Files using the React namespace (e.g. React.ReactNode, ReactLiveScope) are unchanged. - Normalize resulting `import {type X} from 'react'` to `import type {X} from 'react'`. - The swizzle wrap generator no longer emits `import React`. Co-Authored-By: Claude Opus 5.5 --- .../__fixtures__/partials/SomeComponent.js | 2 - .../website/components/Typography.tsx | 2 +- .../src/client/sidebarUtils.tsx | 2 +- .../src/client/__tests__/docsSidebar.test.tsx | 1 - .../src/client/__tests__/docsUtils.test.tsx | 1 - .../src/client/__tests__/docsVersion.test.tsx | 1 - .../src/theme/DebugConfig/index.tsx | 2 +- .../src/theme/DebugContent/index.tsx | 2 +- .../src/theme/DebugGlobalData/index.tsx | 2 +- .../src/theme/DebugJsonView/index.tsx | 2 +- .../src/theme/DebugLayout/index.tsx | 2 +- .../src/theme/DebugRegistry/index.tsx | 2 +- .../src/theme/DebugRoutes/index.tsx | 2 +- .../src/theme/DebugSiteMetadata/index.tsx | 2 +- .../src/theme/IdealImage/index.tsx | 2 +- .../theme/IdealImageLegacy/__tests__/icon.js | 1 - .../components/Icon/Download.js | 1 - .../components/Icon/Loading.js | 1 - .../components/Icon/Offline.js | 1 - .../components/Icon/Warning.js | 1 - .../IdealImageLegacy/components/Icon/index.js | 1 - .../components/IdealImage/index.js | 2 +- .../IdealImageWithDefaults/index.js | 1 - .../components/MediaWithDefaults/index.js | 1 - .../src/renderReloadPopup.tsx | 1 - .../src/theme/PwaReloadPopup/index.tsx | 2 +- .../src/theme/Admonition/Icon/Danger.tsx | 2 +- .../src/theme/Admonition/Icon/Info.tsx | 2 +- .../src/theme/Admonition/Icon/Note.tsx | 2 +- .../src/theme/Admonition/Icon/Tip.tsx | 2 +- .../src/theme/Admonition/Icon/Warning.tsx | 2 +- .../src/theme/Admonition/Layout/index.tsx | 2 +- .../src/theme/Admonition/Type/Caution.tsx | 2 +- .../src/theme/Admonition/Type/Danger.tsx | 2 +- .../src/theme/Admonition/Type/Info.tsx | 2 +- .../src/theme/Admonition/Type/Note.tsx | 2 +- .../src/theme/Admonition/Type/Tip.tsx | 2 +- .../src/theme/Admonition/Type/Warning.tsx | 2 +- .../src/theme/Admonition/Types.tsx | 1 - .../src/theme/Admonition/index.tsx | 2 +- .../AnnouncementBar/CloseButton/index.tsx | 2 +- .../theme/AnnouncementBar/Content/index.tsx | 2 +- .../src/theme/AnnouncementBar/index.tsx | 2 +- .../src/theme/BackToTopButton/index.tsx | 2 +- .../Blog/Components/Author/Socials/index.tsx | 1 - .../theme/Blog/Components/Author/index.tsx | 2 +- .../Blog/Pages/BlogAuthorsListPage/index.tsx | 3 +- .../Blog/Pages/BlogAuthorsPostsPage/index.tsx | 2 +- .../src/theme/BlogArchivePage/index.tsx | 2 +- .../src/theme/BlogLayout/index.tsx | 2 +- .../BlogListPage/StructuredData/index.tsx | 2 +- .../src/theme/BlogListPage/index.tsx | 2 +- .../src/theme/BlogListPaginator/index.tsx | 2 +- .../theme/BlogPostItem/Container/index.tsx | 2 +- .../src/theme/BlogPostItem/Content/index.tsx | 2 +- .../Footer/ReadMoreLink/index.tsx | 2 +- .../src/theme/BlogPostItem/Footer/index.tsx | 2 +- .../BlogPostItem/Header/Authors/index.tsx | 2 +- .../theme/BlogPostItem/Header/Info/index.tsx | 2 +- .../theme/BlogPostItem/Header/Title/index.tsx | 2 +- .../src/theme/BlogPostItem/Header/index.tsx | 2 +- .../src/theme/BlogPostItem/index.tsx | 2 +- .../src/theme/BlogPostItems/index.tsx | 2 +- .../src/theme/BlogPostPage/Metadata/index.tsx | 2 +- .../BlogPostPage/StructuredData/index.tsx | 2 +- .../src/theme/BlogPostPage/index.tsx | 2 +- .../src/theme/BlogPostPaginator/index.tsx | 2 +- .../src/theme/BlogSidebar/Content/index.tsx | 2 +- .../src/theme/BlogSidebar/Desktop/index.tsx | 2 +- .../src/theme/BlogSidebar/Mobile/index.tsx | 2 +- .../src/theme/BlogSidebar/index.tsx | 2 +- .../src/theme/BlogTagsListPage/index.tsx | 2 +- .../src/theme/BlogTagsPostsPage/index.tsx | 2 +- .../theme/CodeBlock/Buttons/Button/index.tsx | 2 +- .../CodeBlock/Buttons/CopyButton/index.tsx | 8 +--- .../Buttons/WordWrapButton/index.tsx | 2 +- .../src/theme/CodeBlock/Buttons/index.tsx | 2 +- .../src/theme/CodeBlock/Container/index.tsx | 2 +- .../src/theme/CodeBlock/Content/Element.tsx | 2 +- .../src/theme/CodeBlock/Content/String.tsx | 2 +- .../src/theme/CodeBlock/Content/index.tsx | 2 +- .../src/theme/CodeBlock/Layout/index.tsx | 2 +- .../src/theme/CodeBlock/Line/Token/index.tsx | 2 +- .../src/theme/CodeBlock/Line/index.tsx | 2 +- .../src/theme/CodeInline/index.tsx | 2 +- .../theme/ContentVisibility/Draft/index.tsx | 2 +- .../ContentVisibility/Unlisted/index.tsx | 2 +- .../src/theme/ContentVisibility/index.tsx | 2 +- .../src/theme/Details/index.tsx | 2 +- .../theme/DocBreadcrumbs/Items/Home/index.tsx | 2 +- .../DocBreadcrumbs/StructuredData/index.tsx | 2 +- .../src/theme/DocBreadcrumbs/index.tsx | 2 +- .../src/theme/DocCard/Description/index.tsx | 2 +- .../src/theme/DocCard/Heading/Icon/index.tsx | 2 +- .../src/theme/DocCard/Heading/Text/index.tsx | 2 +- .../src/theme/DocCard/Heading/index.tsx | 2 +- .../src/theme/DocCard/Layout/index.tsx | 2 +- .../src/theme/DocCard/index.tsx | 2 +- .../src/theme/DocCardList/index.tsx | 2 +- .../DocCategoryGeneratedIndexPage/index.tsx | 2 +- .../src/theme/DocItem/Content/index.tsx | 2 +- .../src/theme/DocItem/Footer/index.tsx | 2 +- .../src/theme/DocItem/Layout/index.tsx | 2 +- .../src/theme/DocItem/Metadata/index.tsx | 2 +- .../src/theme/DocItem/Paginator/index.tsx | 2 +- .../src/theme/DocItem/TOC/Desktop/index.tsx | 2 +- .../src/theme/DocItem/TOC/Mobile/index.tsx | 2 +- .../src/theme/DocItem/index.tsx | 2 +- .../src/theme/DocPaginator/index.tsx | 2 +- .../src/theme/DocRoot/Layout/Main/index.tsx | 2 +- .../Layout/Sidebar/ExpandButton/index.tsx | 2 +- .../src/theme/DocRoot/Layout/index.tsx | 2 +- .../src/theme/DocRoot/index.tsx | 2 +- .../Desktop/CollapseButton/index.tsx | 2 +- .../DocSidebar/Desktop/Content/index.tsx | 2 +- .../src/theme/DocSidebar/index.tsx | 2 +- .../theme/DocSidebarItem/Category/index.tsx | 2 +- .../src/theme/DocSidebarItem/Html/index.tsx | 2 +- .../src/theme/DocSidebarItem/Link/index.tsx | 2 +- .../src/theme/DocSidebarItem/index.tsx | 2 +- .../src/theme/DocSidebarItems/index.tsx | 2 +- .../src/theme/DocTagDocListPage/index.tsx | 2 +- .../src/theme/DocTagsListPage/index.tsx | 2 +- .../src/theme/DocVersionBadge/index.tsx | 2 +- .../src/theme/DocVersionBanner/index.tsx | 2 +- .../src/theme/DocVersionRoot/index.tsx | 2 +- .../src/theme/DocsRoot/index.tsx | 2 +- .../src/theme/EditMetaRow/index.tsx | 3 +- .../src/theme/EditThisPage/index.tsx | 2 +- .../src/theme/ErrorPageContent.tsx | 2 +- .../src/theme/Footer/Copyright/index.tsx | 2 +- .../src/theme/Footer/Layout/index.tsx | 2 +- .../src/theme/Footer/LinkItem/index.tsx | 2 +- .../theme/Footer/Links/MultiColumn/index.tsx | 2 +- .../src/theme/Footer/Links/index.tsx | 2 +- .../src/theme/Footer/Logo/index.tsx | 2 +- .../src/theme/Heading/index.tsx | 2 +- .../src/theme/Icon/Arrow/index.tsx | 2 +- .../src/theme/Icon/Close/index.tsx | 2 +- .../src/theme/Icon/Copy/index.tsx | 2 +- .../src/theme/Icon/DarkMode/index.tsx | 2 +- .../src/theme/Icon/Edit/index.tsx | 2 +- .../src/theme/Icon/ExternalLink/index.tsx | 2 +- .../src/theme/Icon/Home/index.tsx | 2 +- .../src/theme/Icon/Language/index.tsx | 2 +- .../src/theme/Icon/LightMode/index.tsx | 2 +- .../src/theme/Icon/Menu/index.tsx | 2 +- .../src/theme/Icon/Success/index.tsx | 2 +- .../src/theme/Icon/WordWrap/index.tsx | 2 +- .../src/theme/LastUpdated/index.tsx | 2 +- .../src/theme/Layout/Provider/index.tsx | 2 +- .../src/theme/Layout/index.tsx | 2 +- .../src/theme/Logo/index.tsx | 2 +- .../src/theme/MDXComponents/A/index.tsx | 2 +- .../src/theme/MDXComponents/Heading.tsx | 2 +- .../src/theme/MDXComponents/Img/index.tsx | 2 +- .../src/theme/MDXComponents/Li.tsx | 2 +- .../src/theme/MDXComponents/Pre.tsx | 2 +- .../src/theme/MDXComponents/Ul/index.tsx | 2 +- .../src/theme/MDXComponents/index.tsx | 2 +- .../src/theme/MDXContent/index.tsx | 2 +- .../src/theme/MDXPage/index.tsx | 2 +- .../theme/Navbar/ColorModeToggle/index.tsx | 2 +- .../src/theme/Navbar/Content/index.tsx | 2 +- .../src/theme/Navbar/Layout/index.tsx | 2 +- .../src/theme/Navbar/Logo/index.tsx | 2 +- .../Navbar/MobileSidebar/Header/index.tsx | 2 +- .../Navbar/MobileSidebar/Layout/index.tsx | 2 +- .../MobileSidebar/PrimaryMenu/index.tsx | 2 +- .../MobileSidebar/SecondaryMenu/index.tsx | 2 +- .../Navbar/MobileSidebar/Toggle/index.tsx | 2 +- .../src/theme/Navbar/MobileSidebar/index.tsx | 2 +- .../src/theme/Navbar/Search/index.tsx | 2 +- .../src/theme/Navbar/index.tsx | 2 +- .../DefaultNavbarItem/Desktop/index.tsx | 2 +- .../DefaultNavbarItem/Mobile/index.tsx | 2 +- .../NavbarItem/DefaultNavbarItem/index.tsx | 2 +- .../src/theme/NavbarItem/DocNavbarItem.tsx | 2 +- .../theme/NavbarItem/DocSidebarNavbarItem.tsx | 2 +- .../DocsVersionDropdownNavbarItem.tsx | 2 +- .../NavbarItem/DocsVersionNavbarItem.tsx | 2 +- .../DropdownNavbarItem/Desktop/index.tsx | 2 +- .../DropdownNavbarItem/Mobile/index.tsx | 2 +- .../NavbarItem/DropdownNavbarItem/index.tsx | 2 +- .../src/theme/NavbarItem/HtmlNavbarItem.tsx | 2 +- .../LocaleDropdownNavbarItem/index.tsx | 2 +- .../src/theme/NavbarItem/NavbarNavLink.tsx | 2 +- .../src/theme/NavbarItem/SearchNavbarItem.tsx | 2 +- .../src/theme/NavbarItem/index.tsx | 2 +- .../src/theme/NotFound/Content/index.tsx | 2 +- .../src/theme/NotFound/index.tsx | 2 +- .../src/theme/PaginatorNavLink/index.tsx | 2 +- .../src/theme/SearchMetadata/index.tsx | 2 +- .../src/theme/SiteMetadata/index.tsx | 2 +- .../src/theme/SkipToContent/index.tsx | 2 +- .../src/theme/TOC/index.tsx | 2 +- .../TOCCollapsible/CollapseButton/index.tsx | 2 +- .../src/theme/TOCCollapsible/index.tsx | 2 +- .../src/theme/TOCInline/index.tsx | 2 +- .../src/theme/TOCItems/index.tsx | 2 +- .../src/theme/TabItem/index.tsx | 2 +- .../src/theme/Tabs/__tests__/index.test.tsx | 1 - .../src/theme/Tag/index.tsx | 2 +- .../src/theme/TagsListByLetter/index.tsx | 2 +- .../src/theme/TagsListInline/index.tsx | 2 +- .../ThemeProvider/TitleFormatter/index.tsx | 2 +- .../src/theme/ThemeProvider/index.tsx | 2 +- .../src/theme/ThemedImage/index.tsx | 2 +- .../Details/__tests__/index.test.tsx | 1 - .../src/translations/blogTranslations.tsx | 2 +- .../contentVisibilityTranslations.tsx | 2 +- .../__tests__/useAlternatePageUtils.test.tsx | 1 - .../utils/__tests__/useLocalPathname.test.tsx | 1 - .../utils/__tests__/usePluralForm.test.tsx | 1 - .../src/utils/navbarUtils.tsx | 2 +- .../src/utils/reactUtils.tsx | 2 +- .../src/theme/CodeBlock/index.tsx | 2 +- .../src/theme/LiveCodeBlock/index.tsx | 2 +- .../src/theme/Playground/Container/index.tsx | 2 +- .../src/theme/Playground/Editor/index.tsx | 2 +- .../src/theme/Playground/Header/index.tsx | 2 +- .../src/theme/Playground/Layout/index.tsx | 2 +- .../src/theme/Playground/Preview/index.tsx | 2 +- .../src/theme/Playground/Provider/index.tsx | 2 +- .../src/theme/Playground/index.tsx | 2 +- .../src/theme/Mermaid/index.tsx | 2 +- .../src/theme/SearchBar/index.tsx | 8 +--- .../src/theme/SearchPage/index.tsx | 8 +--- packages/docusaurus-tsconfig/tsconfig.json | 1 + packages/docusaurus/src/client/App.tsx | 2 +- .../src/client/BaseUrlIssueBanner/index.tsx | 2 +- .../src/client/SiteMetadataDefaults.tsx | 2 +- .../__tests__/docusaurusContext.test.tsx | 1 - .../client/__tests__/routeContext.test.tsx | 1 - .../docusaurus/src/client/clientEntry.tsx | 2 +- .../src/client/exports/BrowserOnly.tsx | 2 +- .../docusaurus/src/client/exports/Head.tsx | 2 +- .../docusaurus/src/client/exports/Link.tsx | 2 +- .../src/client/exports/Translate.tsx | 2 +- .../client/exports/__tests__/Head.test.tsx | 1 - .../exports/__tests__/Interpolate.test.tsx | 1 - .../client/exports/__tests__/Link.test.tsx | 2 +- .../exports/__tests__/Translate.test.tsx | 1 - .../exports/__tests__/useBaseUrl.test.tsx | 1 - .../exports/__tests__/useGlobalData.test.tsx | 1 - .../exports/__tests__/useIsBrowser.test.tsx | 2 +- .../__tests__/useRouteContext.test.tsx | 1 - .../src/client/hasHydratedDataAttribute.tsx | 1 - .../docusaurus/src/client/serverEntry.tsx | 1 - .../src/client/theme-fallback/Error/index.tsx | 2 +- .../client/theme-fallback/Layout/index.tsx | 2 +- .../client/theme-fallback/Loading/index.tsx | 2 +- .../client/theme-fallback/NotFound/index.tsx | 2 +- .../src/client/theme-fallback/Root/index.tsx | 2 +- .../theme-fallback/ThemeProvider/index.tsx | 2 +- .../ComponentInSubFolder/index.tsx | 2 - .../theme/ComponentInFolder/Sibling.tsx | 2 - .../theme/ComponentInFolder/index.tsx | 2 - .../theme/FirstLevelComponent.tsx | 2 - .../__fixtures__/theme/JsComponent/index.js | 2 - .../theme/NoIndex/NoIndexComp1.tsx | 2 - .../theme/NoIndex/NoIndexComp2.tsx | 2 - .../NoIndex/NoIndexSub/NoIndexSubComp.tsx | 2 - .../ComponentInFixturesFolder.tsx | 2 - .../__mocks__/ComponentInMocksFolder.tsx | 2 - .../theme/__tests__/ComponentInTestFolder.tsx | 2 - .../__snapshots__/actions.test.ts.snap | 15 +++---- .../__snapshots__/index.test.ts.snap | 44 ++++++------------- .../src/commands/swizzle/actions.ts | 5 +-- .../__fixtures__/custom-site/pages/bar/baz.js | 2 - .../__fixtures__/custom-site/pages/foo.js | 2 - .../custom-site/pages/foo/index.js | 2 - .../__fixtures__/custom-site/pages/index.js | 2 - tsconfig.base.json | 3 ++ 274 files changed, 252 insertions(+), 345 deletions(-) diff --git a/packages/docusaurus-mdx-loader/src/remark/toc/__tests__/__fixtures__/partials/SomeComponent.js b/packages/docusaurus-mdx-loader/src/remark/toc/__tests__/__fixtures__/partials/SomeComponent.js index eaaa9a4fcade..043cc2d8c53e 100644 --- a/packages/docusaurus-mdx-loader/src/remark/toc/__tests__/__fixtures__/partials/SomeComponent.js +++ b/packages/docusaurus-mdx-loader/src/remark/toc/__tests__/__fixtures__/partials/SomeComponent.js @@ -1,5 +1,3 @@ -import React from 'react'; - export default function SomeComponent() { return
Some component
; } diff --git a/packages/docusaurus-plugin-content-blog/src/__tests__/__fixtures__/website/components/Typography.tsx b/packages/docusaurus-plugin-content-blog/src/__tests__/__fixtures__/website/components/Typography.tsx index 67bc17f97604..ab62e48baca7 100644 --- a/packages/docusaurus-plugin-content-blog/src/__tests__/__fixtures__/website/components/Typography.tsx +++ b/packages/docusaurus-plugin-content-blog/src/__tests__/__fixtures__/website/components/Typography.tsx @@ -1,4 +1,4 @@ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; export default function Typography(props: {children: ReactNode}) { return

{props.children}

; diff --git a/packages/docusaurus-plugin-content-blog/src/client/sidebarUtils.tsx b/packages/docusaurus-plugin-content-blog/src/client/sidebarUtils.tsx index 3c276c0aa2ab..88d3a41f3f2c 100644 --- a/packages/docusaurus-plugin-content-blog/src/client/sidebarUtils.tsx +++ b/packages/docusaurus-plugin-content-blog/src/client/sidebarUtils.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode, useMemo} from 'react'; +import {type ReactNode, useMemo} from 'react'; import {useLocation} from '@docusaurus/router'; import Link from '@docusaurus/Link'; import {groupBy} from '@docusaurus/theme-common'; diff --git a/packages/docusaurus-plugin-content-docs/src/client/__tests__/docsSidebar.test.tsx b/packages/docusaurus-plugin-content-docs/src/client/__tests__/docsSidebar.test.tsx index 3b4e1d2e47d3..b6529c2b04d8 100644 --- a/packages/docusaurus-plugin-content-docs/src/client/__tests__/docsSidebar.test.tsx +++ b/packages/docusaurus-plugin-content-docs/src/client/__tests__/docsSidebar.test.tsx @@ -6,7 +6,6 @@ */ // @vitest-environment jsdom import {describe, expect, it} from 'vitest'; -import React from 'react'; import {renderHook} from '@testing-library/react'; import {useDocsSidebar, DocsSidebarProvider} from '../docsSidebar'; import type {PropSidebar} from '@docusaurus/plugin-content-docs'; diff --git a/packages/docusaurus-plugin-content-docs/src/client/__tests__/docsUtils.test.tsx b/packages/docusaurus-plugin-content-docs/src/client/__tests__/docsUtils.test.tsx index abc3ef533849..efabc421d84f 100644 --- a/packages/docusaurus-plugin-content-docs/src/client/__tests__/docsUtils.test.tsx +++ b/packages/docusaurus-plugin-content-docs/src/client/__tests__/docsUtils.test.tsx @@ -6,7 +6,6 @@ */ // @vitest-environment jsdom import {describe, expect, it} from 'vitest'; -import React from 'react'; import {renderHook} from '@testing-library/react'; import {StaticRouter} from 'react-router-dom'; import {Context} from '@docusaurus/core/src/client/docusaurusContext'; diff --git a/packages/docusaurus-plugin-content-docs/src/client/__tests__/docsVersion.test.tsx b/packages/docusaurus-plugin-content-docs/src/client/__tests__/docsVersion.test.tsx index f3efa4723a6c..42b4699b2f50 100644 --- a/packages/docusaurus-plugin-content-docs/src/client/__tests__/docsVersion.test.tsx +++ b/packages/docusaurus-plugin-content-docs/src/client/__tests__/docsVersion.test.tsx @@ -6,7 +6,6 @@ */ // @vitest-environment jsdom import {describe, expect, it} from 'vitest'; -import React from 'react'; import {renderHook} from '@testing-library/react'; import {useDocsVersion, DocsVersionProvider} from '../docsVersion'; import type {PropVersionMetadata} from '@docusaurus/plugin-content-docs'; diff --git a/packages/docusaurus-plugin-debug/src/theme/DebugConfig/index.tsx b/packages/docusaurus-plugin-debug/src/theme/DebugConfig/index.tsx index 1245ec6121c1..b77310854fe8 100644 --- a/packages/docusaurus-plugin-debug/src/theme/DebugConfig/index.tsx +++ b/packages/docusaurus-plugin-debug/src/theme/DebugConfig/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import DebugLayout from '@theme/DebugLayout'; import DebugJsonView from '@theme/DebugJsonView'; diff --git a/packages/docusaurus-plugin-debug/src/theme/DebugContent/index.tsx b/packages/docusaurus-plugin-debug/src/theme/DebugContent/index.tsx index 9cd6773de642..ef914dd8fea0 100644 --- a/packages/docusaurus-plugin-debug/src/theme/DebugContent/index.tsx +++ b/packages/docusaurus-plugin-debug/src/theme/DebugContent/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import DebugLayout from '@theme/DebugLayout'; import DebugJsonView from '@theme/DebugJsonView'; diff --git a/packages/docusaurus-plugin-debug/src/theme/DebugGlobalData/index.tsx b/packages/docusaurus-plugin-debug/src/theme/DebugGlobalData/index.tsx index 139cc382cef2..949b0ee1c030 100644 --- a/packages/docusaurus-plugin-debug/src/theme/DebugGlobalData/index.tsx +++ b/packages/docusaurus-plugin-debug/src/theme/DebugGlobalData/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import useGlobalData from '@docusaurus/useGlobalData'; import DebugLayout from '@theme/DebugLayout'; import DebugJsonView from '@theme/DebugJsonView'; diff --git a/packages/docusaurus-plugin-debug/src/theme/DebugJsonView/index.tsx b/packages/docusaurus-plugin-debug/src/theme/DebugJsonView/index.tsx index c30a61a32318..702f82717a2b 100644 --- a/packages/docusaurus-plugin-debug/src/theme/DebugJsonView/index.tsx +++ b/packages/docusaurus-plugin-debug/src/theme/DebugJsonView/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import { JsonView, defaultStyles, diff --git a/packages/docusaurus-plugin-debug/src/theme/DebugLayout/index.tsx b/packages/docusaurus-plugin-debug/src/theme/DebugLayout/index.tsx index 80bda6776f72..e1057c7b9b56 100644 --- a/packages/docusaurus-plugin-debug/src/theme/DebugLayout/index.tsx +++ b/packages/docusaurus-plugin-debug/src/theme/DebugLayout/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Head from '@docusaurus/Head'; import Link from '@docusaurus/Link'; import styles from './styles.module.css'; diff --git a/packages/docusaurus-plugin-debug/src/theme/DebugRegistry/index.tsx b/packages/docusaurus-plugin-debug/src/theme/DebugRegistry/index.tsx index c7e8272325b7..112e8965f617 100644 --- a/packages/docusaurus-plugin-debug/src/theme/DebugRegistry/index.tsx +++ b/packages/docusaurus-plugin-debug/src/theme/DebugRegistry/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import registry from '@generated/registry'; import DebugLayout from '@theme/DebugLayout'; import styles from './styles.module.css'; diff --git a/packages/docusaurus-plugin-debug/src/theme/DebugRoutes/index.tsx b/packages/docusaurus-plugin-debug/src/theme/DebugRoutes/index.tsx index 8c771e076be8..e5b31d73d6e0 100644 --- a/packages/docusaurus-plugin-debug/src/theme/DebugRoutes/index.tsx +++ b/packages/docusaurus-plugin-debug/src/theme/DebugRoutes/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import routes from '@generated/routes'; import DebugLayout from '@theme/DebugLayout'; import DebugJsonView from '@theme/DebugJsonView'; diff --git a/packages/docusaurus-plugin-debug/src/theme/DebugSiteMetadata/index.tsx b/packages/docusaurus-plugin-debug/src/theme/DebugSiteMetadata/index.tsx index 4f24972834d7..343f69bb3a6f 100644 --- a/packages/docusaurus-plugin-debug/src/theme/DebugSiteMetadata/index.tsx +++ b/packages/docusaurus-plugin-debug/src/theme/DebugSiteMetadata/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import DebugLayout from '@theme/DebugLayout'; import styles from './styles.module.css'; diff --git a/packages/docusaurus-plugin-ideal-image/src/theme/IdealImage/index.tsx b/packages/docusaurus-plugin-ideal-image/src/theme/IdealImage/index.tsx index dcf485fe8bc7..4b72be783d86 100644 --- a/packages/docusaurus-plugin-ideal-image/src/theme/IdealImage/index.tsx +++ b/packages/docusaurus-plugin-ideal-image/src/theme/IdealImage/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {translate} from '@docusaurus/Translate'; import ReactIdealImage, { type IconKey, diff --git a/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/__tests__/icon.js b/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/__tests__/icon.js index 5e427efbfecb..624a27f07403 100644 --- a/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/__tests__/icon.js +++ b/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/__tests__/icon.js @@ -3,7 +3,6 @@ */ import {describe, expect, it} from 'vitest'; -import React from 'react'; import {render} from '@testing-library/react'; import '@testing-library/jest-dom/vitest'; import Download from '../components/Icon/Download'; diff --git a/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components/Icon/Download.js b/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components/Icon/Download.js index ac9876766af7..3519ce24650a 100644 --- a/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components/Icon/Download.js +++ b/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components/Icon/Download.js @@ -2,7 +2,6 @@ // It is licensed under Apache License 2.0 // Full text is available here // https://github.com/google/material-design-icons/blob/master/LICENSE -import React from 'react'; import Icon from './index'; const Download = (props) => ( diff --git a/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components/Icon/Loading.js b/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components/Icon/Loading.js index dbc8d05e61fc..890d8ca1d37e 100644 --- a/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components/Icon/Loading.js +++ b/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components/Icon/Loading.js @@ -2,7 +2,6 @@ // It is licensed under Apache License 2.0 // Full text is available here // https://github.com/google/material-design-icons/blob/master/LICENSE -import React from 'react'; import Icon from './index'; const Loading = (props) => ( diff --git a/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components/Icon/Offline.js b/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components/Icon/Offline.js index b704f74c61c6..6a8938bd69b2 100644 --- a/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components/Icon/Offline.js +++ b/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components/Icon/Offline.js @@ -2,7 +2,6 @@ // It is licensed under Apache License 2.0 // Full text is available here // https://github.com/google/material-design-icons/blob/master/LICENSE -import React from 'react'; import Icon from './index'; const Offline = (props) => ( diff --git a/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components/Icon/Warning.js b/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components/Icon/Warning.js index 3bee0034c67f..4e4c539332ca 100644 --- a/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components/Icon/Warning.js +++ b/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components/Icon/Warning.js @@ -2,7 +2,6 @@ // It is licensed under Apache License 2.0 // Full text is available here // https://github.com/google/material-design-icons/blob/master/LICENSE -import React from 'react'; import Icon from './index'; const Warning = (props) => ( diff --git a/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components/Icon/index.js b/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components/Icon/index.js index 11593b154ea3..f3e40febfaff 100644 --- a/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components/Icon/index.js +++ b/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components/Icon/index.js @@ -1,4 +1,3 @@ -import React from 'react'; // import PropTypes from 'prop-types' const Icon = ({size = 24, fill = '#000', className, path}) => ( diff --git a/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components/IdealImage/index.js b/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components/IdealImage/index.js index 2d3f4b6447da..d24515b0d251 100644 --- a/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components/IdealImage/index.js +++ b/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components/IdealImage/index.js @@ -1,4 +1,4 @@ -import React, {Component} from 'react'; +import {Component} from 'react'; import {Waypoint} from './waypoint'; import Media from '../Media'; import {icons, loadStates} from '../constants'; diff --git a/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components/IdealImageWithDefaults/index.js b/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components/IdealImageWithDefaults/index.js index b485fe1c6567..90f27fcced0b 100644 --- a/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components/IdealImageWithDefaults/index.js +++ b/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components/IdealImageWithDefaults/index.js @@ -1,4 +1,3 @@ -import React from 'react'; import IdealImage from '../IdealImage'; import icons from '../icons'; import theme from '../theme'; diff --git a/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components/MediaWithDefaults/index.js b/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components/MediaWithDefaults/index.js index 65e3dab73d9f..eb96a307afd6 100644 --- a/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components/MediaWithDefaults/index.js +++ b/packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy/components/MediaWithDefaults/index.js @@ -1,4 +1,3 @@ -import React from 'react'; import Media from '../Media'; import icons from '../icons'; import theme from '../theme'; diff --git a/packages/docusaurus-plugin-pwa/src/renderReloadPopup.tsx b/packages/docusaurus-plugin-pwa/src/renderReloadPopup.tsx index 6935304e68cb..94ba9784f2f4 100644 --- a/packages/docusaurus-plugin-pwa/src/renderReloadPopup.tsx +++ b/packages/docusaurus-plugin-pwa/src/renderReloadPopup.tsx @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -import React from 'react'; import {createRoot} from 'react-dom/client'; import type {Props} from '@theme/PwaReloadPopup'; diff --git a/packages/docusaurus-plugin-pwa/src/theme/PwaReloadPopup/index.tsx b/packages/docusaurus-plugin-pwa/src/theme/PwaReloadPopup/index.tsx index 54222c66e5f8..aabfe20121a8 100644 --- a/packages/docusaurus-plugin-pwa/src/theme/PwaReloadPopup/index.tsx +++ b/packages/docusaurus-plugin-pwa/src/theme/PwaReloadPopup/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode, useState} from 'react'; +import {type ReactNode, useState} from 'react'; import clsx from 'clsx'; import Translate, {translate} from '@docusaurus/Translate'; import type {Props} from '@theme/PwaReloadPopup'; diff --git a/packages/docusaurus-theme-classic/src/theme/Admonition/Icon/Danger.tsx b/packages/docusaurus-theme-classic/src/theme/Admonition/Icon/Danger.tsx index 5ef416dc58f2..034ba1ede611 100644 --- a/packages/docusaurus-theme-classic/src/theme/Admonition/Icon/Danger.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Admonition/Icon/Danger.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import type {Props} from '@theme/Admonition/Icon/Danger'; export default function AdmonitionIconDanger(props: Props): ReactNode { diff --git a/packages/docusaurus-theme-classic/src/theme/Admonition/Icon/Info.tsx b/packages/docusaurus-theme-classic/src/theme/Admonition/Icon/Info.tsx index fd0f5370b68e..ec066bc9d23c 100644 --- a/packages/docusaurus-theme-classic/src/theme/Admonition/Icon/Info.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Admonition/Icon/Info.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import type {Props} from '@theme/Admonition/Icon/Info'; export default function AdmonitionIconInfo(props: Props): ReactNode { diff --git a/packages/docusaurus-theme-classic/src/theme/Admonition/Icon/Note.tsx b/packages/docusaurus-theme-classic/src/theme/Admonition/Icon/Note.tsx index f8414fe95781..92fd503b2603 100644 --- a/packages/docusaurus-theme-classic/src/theme/Admonition/Icon/Note.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Admonition/Icon/Note.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import type {Props} from '@theme/Admonition/Icon/Note'; export default function AdmonitionIconNote(props: Props): ReactNode { diff --git a/packages/docusaurus-theme-classic/src/theme/Admonition/Icon/Tip.tsx b/packages/docusaurus-theme-classic/src/theme/Admonition/Icon/Tip.tsx index 28d26cd9ea4c..121863198cc2 100644 --- a/packages/docusaurus-theme-classic/src/theme/Admonition/Icon/Tip.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Admonition/Icon/Tip.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import type {Props} from '@theme/Admonition/Icon/Tip'; export default function AdmonitionIconTip(props: Props): ReactNode { diff --git a/packages/docusaurus-theme-classic/src/theme/Admonition/Icon/Warning.tsx b/packages/docusaurus-theme-classic/src/theme/Admonition/Icon/Warning.tsx index 904934c406f4..843247a92964 100644 --- a/packages/docusaurus-theme-classic/src/theme/Admonition/Icon/Warning.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Admonition/Icon/Warning.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import type {Props} from '@theme/Admonition/Icon/Warning'; export default function AdmonitionIconCaution(props: Props): ReactNode { diff --git a/packages/docusaurus-theme-classic/src/theme/Admonition/Layout/index.tsx b/packages/docusaurus-theme-classic/src/theme/Admonition/Layout/index.tsx index 521712de772c..5ece26ced4da 100644 --- a/packages/docusaurus-theme-classic/src/theme/Admonition/Layout/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Admonition/Layout/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {ThemeClassNames} from '@docusaurus/theme-common'; diff --git a/packages/docusaurus-theme-classic/src/theme/Admonition/Type/Caution.tsx b/packages/docusaurus-theme-classic/src/theme/Admonition/Type/Caution.tsx index 48ac08878df2..279be44ef9dd 100644 --- a/packages/docusaurus-theme-classic/src/theme/Admonition/Type/Caution.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Admonition/Type/Caution.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import Translate from '@docusaurus/Translate'; import type {Props} from '@theme/Admonition/Type/Caution'; diff --git a/packages/docusaurus-theme-classic/src/theme/Admonition/Type/Danger.tsx b/packages/docusaurus-theme-classic/src/theme/Admonition/Type/Danger.tsx index dcfb5141631f..32cf7d6cb8ed 100644 --- a/packages/docusaurus-theme-classic/src/theme/Admonition/Type/Danger.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Admonition/Type/Danger.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import Translate from '@docusaurus/Translate'; import type {Props} from '@theme/Admonition/Type/Danger'; diff --git a/packages/docusaurus-theme-classic/src/theme/Admonition/Type/Info.tsx b/packages/docusaurus-theme-classic/src/theme/Admonition/Type/Info.tsx index fbb31e478b1d..18236645e037 100644 --- a/packages/docusaurus-theme-classic/src/theme/Admonition/Type/Info.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Admonition/Type/Info.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import Translate from '@docusaurus/Translate'; import type {Props} from '@theme/Admonition/Type/Info'; diff --git a/packages/docusaurus-theme-classic/src/theme/Admonition/Type/Note.tsx b/packages/docusaurus-theme-classic/src/theme/Admonition/Type/Note.tsx index 952532c27b6c..43d0306e69cf 100644 --- a/packages/docusaurus-theme-classic/src/theme/Admonition/Type/Note.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Admonition/Type/Note.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import Translate from '@docusaurus/Translate'; import type {Props} from '@theme/Admonition/Type/Note'; diff --git a/packages/docusaurus-theme-classic/src/theme/Admonition/Type/Tip.tsx b/packages/docusaurus-theme-classic/src/theme/Admonition/Type/Tip.tsx index 1a407cbf5515..ae1e81a0f7dd 100644 --- a/packages/docusaurus-theme-classic/src/theme/Admonition/Type/Tip.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Admonition/Type/Tip.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import Translate from '@docusaurus/Translate'; import type {Props} from '@theme/Admonition/Type/Tip'; diff --git a/packages/docusaurus-theme-classic/src/theme/Admonition/Type/Warning.tsx b/packages/docusaurus-theme-classic/src/theme/Admonition/Type/Warning.tsx index 2733046ef957..9937b8d29de3 100644 --- a/packages/docusaurus-theme-classic/src/theme/Admonition/Type/Warning.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Admonition/Type/Warning.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import Translate from '@docusaurus/Translate'; import type {Props} from '@theme/Admonition/Type/Warning'; diff --git a/packages/docusaurus-theme-classic/src/theme/Admonition/Types.tsx b/packages/docusaurus-theme-classic/src/theme/Admonition/Types.tsx index 654063cf861e..c9b02738215f 100644 --- a/packages/docusaurus-theme-classic/src/theme/Admonition/Types.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Admonition/Types.tsx @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -import React from 'react'; import AdmonitionTypeNote from '@theme/Admonition/Type/Note'; import AdmonitionTypeTip from '@theme/Admonition/Type/Tip'; import AdmonitionTypeInfo from '@theme/Admonition/Type/Info'; diff --git a/packages/docusaurus-theme-classic/src/theme/Admonition/index.tsx b/packages/docusaurus-theme-classic/src/theme/Admonition/index.tsx index a306721ed0a7..bff13003a8b8 100644 --- a/packages/docusaurus-theme-classic/src/theme/Admonition/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Admonition/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ComponentType, type ReactNode} from 'react'; +import type {ComponentType, ReactNode} from 'react'; import {processAdmonitionProps} from '@docusaurus/theme-common'; import type {Props} from '@theme/Admonition'; import AdmonitionTypes from '@theme/Admonition/Types'; diff --git a/packages/docusaurus-theme-classic/src/theme/AnnouncementBar/CloseButton/index.tsx b/packages/docusaurus-theme-classic/src/theme/AnnouncementBar/CloseButton/index.tsx index 6fde5e09accc..7d6674a33738 100644 --- a/packages/docusaurus-theme-classic/src/theme/AnnouncementBar/CloseButton/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/AnnouncementBar/CloseButton/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {translate} from '@docusaurus/Translate'; import IconClose from '@theme/Icon/Close'; diff --git a/packages/docusaurus-theme-classic/src/theme/AnnouncementBar/Content/index.tsx b/packages/docusaurus-theme-classic/src/theme/AnnouncementBar/Content/index.tsx index bc772b00f3f9..5357226bdf51 100644 --- a/packages/docusaurus-theme-classic/src/theme/AnnouncementBar/Content/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/AnnouncementBar/Content/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {useThemeConfig} from '@docusaurus/theme-common'; import type {Props} from '@theme/AnnouncementBar/Content'; diff --git a/packages/docusaurus-theme-classic/src/theme/AnnouncementBar/index.tsx b/packages/docusaurus-theme-classic/src/theme/AnnouncementBar/index.tsx index d2f54e252537..198559087513 100644 --- a/packages/docusaurus-theme-classic/src/theme/AnnouncementBar/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/AnnouncementBar/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {ThemeClassNames, useThemeConfig} from '@docusaurus/theme-common'; import {useAnnouncementBar} from '@docusaurus/theme-common/internal'; diff --git a/packages/docusaurus-theme-classic/src/theme/BackToTopButton/index.tsx b/packages/docusaurus-theme-classic/src/theme/BackToTopButton/index.tsx index 62f805d276ce..117cdbcdb1e9 100644 --- a/packages/docusaurus-theme-classic/src/theme/BackToTopButton/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BackToTopButton/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {translate} from '@docusaurus/Translate'; import {ThemeClassNames} from '@docusaurus/theme-common'; diff --git a/packages/docusaurus-theme-classic/src/theme/Blog/Components/Author/Socials/index.tsx b/packages/docusaurus-theme-classic/src/theme/Blog/Components/Author/Socials/index.tsx index e163a603dec6..8444a98190b4 100644 --- a/packages/docusaurus-theme-classic/src/theme/Blog/Components/Author/Socials/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Blog/Components/Author/Socials/index.tsx @@ -6,7 +6,6 @@ */ import type {ComponentType, ReactNode} from 'react'; -import React from 'react'; import clsx from 'clsx'; import Link from '@docusaurus/Link'; import type {Props} from '@theme/Blog/Components/Author/Socials'; diff --git a/packages/docusaurus-theme-classic/src/theme/Blog/Components/Author/index.tsx b/packages/docusaurus-theme-classic/src/theme/Blog/Components/Author/index.tsx index 54b7160c44da..85260b42540f 100644 --- a/packages/docusaurus-theme-classic/src/theme/Blog/Components/Author/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Blog/Components/Author/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import Link, {type Props as LinkProps} from '@docusaurus/Link'; import AuthorSocials from '@theme/Blog/Components/Author/Socials'; diff --git a/packages/docusaurus-theme-classic/src/theme/Blog/Pages/BlogAuthorsListPage/index.tsx b/packages/docusaurus-theme-classic/src/theme/Blog/Pages/BlogAuthorsListPage/index.tsx index 71d60a0402a1..ffee2b86ada1 100644 --- a/packages/docusaurus-theme-classic/src/theme/Blog/Pages/BlogAuthorsListPage/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Blog/Pages/BlogAuthorsListPage/index.tsx @@ -4,7 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; + +import type {ReactNode} from 'react'; import clsx from 'clsx'; import { PageMetadata, diff --git a/packages/docusaurus-theme-classic/src/theme/Blog/Pages/BlogAuthorsPostsPage/index.tsx b/packages/docusaurus-theme-classic/src/theme/Blog/Pages/BlogAuthorsPostsPage/index.tsx index 861a1b235018..58d0c923a36a 100644 --- a/packages/docusaurus-theme-classic/src/theme/Blog/Pages/BlogAuthorsPostsPage/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Blog/Pages/BlogAuthorsPostsPage/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import { PageMetadata, diff --git a/packages/docusaurus-theme-classic/src/theme/BlogArchivePage/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogArchivePage/index.tsx index 4a3f0d3998ce..9a26e6a5fcdf 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogArchivePage/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogArchivePage/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Link from '@docusaurus/Link'; import {translate} from '@docusaurus/Translate'; import {PageMetadata} from '@docusaurus/theme-common'; diff --git a/packages/docusaurus-theme-classic/src/theme/BlogLayout/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogLayout/index.tsx index 66ac07060b3e..b37c9450d5e4 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogLayout/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogLayout/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import Layout from '@theme/Layout'; import BlogSidebar from '@theme/BlogSidebar'; diff --git a/packages/docusaurus-theme-classic/src/theme/BlogListPage/StructuredData/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogListPage/StructuredData/index.tsx index 93ad9061ee1b..bcdaacef1a2c 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogListPage/StructuredData/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogListPage/StructuredData/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Head from '@docusaurus/Head'; import {useBlogListPageStructuredData} from '@docusaurus/plugin-content-blog/client'; import type {Props} from '@theme/BlogListPage/StructuredData'; diff --git a/packages/docusaurus-theme-classic/src/theme/BlogListPage/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogListPage/index.tsx index 270773327fb8..00dc7d5f36f1 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogListPage/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogListPage/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; diff --git a/packages/docusaurus-theme-classic/src/theme/BlogListPaginator/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogListPaginator/index.tsx index cc2b0db24e23..b17faa638f4e 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogListPaginator/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogListPaginator/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Translate, {translate} from '@docusaurus/Translate'; import PaginatorNavLink from '@theme/PaginatorNavLink'; import type {Props} from '@theme/BlogListPaginator'; diff --git a/packages/docusaurus-theme-classic/src/theme/BlogPostItem/Container/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogPostItem/Container/index.tsx index 896b9191dd5f..0bae59279017 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogPostItem/Container/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogPostItem/Container/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import type {Props} from '@theme/BlogPostItem/Container'; export default function BlogPostItemContainer({ diff --git a/packages/docusaurus-theme-classic/src/theme/BlogPostItem/Content/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogPostItem/Content/index.tsx index dbc6f4db00c7..19fd8840d327 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogPostItem/Content/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogPostItem/Content/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {blogPostContainerID} from '@docusaurus/utils-common'; import {useBlogPost} from '@docusaurus/plugin-content-blog/client'; diff --git a/packages/docusaurus-theme-classic/src/theme/BlogPostItem/Footer/ReadMoreLink/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogPostItem/Footer/ReadMoreLink/index.tsx index 9e73005f816b..409b647fb8eb 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogPostItem/Footer/ReadMoreLink/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogPostItem/Footer/ReadMoreLink/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Translate, {translate} from '@docusaurus/Translate'; import Link from '@docusaurus/Link'; import type {Props} from '@theme/BlogPostItem/Footer/ReadMoreLink'; diff --git a/packages/docusaurus-theme-classic/src/theme/BlogPostItem/Footer/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogPostItem/Footer/index.tsx index 1646ecfdc83e..1559d430d1ae 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogPostItem/Footer/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogPostItem/Footer/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {useBlogPost} from '@docusaurus/plugin-content-blog/client'; import {ThemeClassNames} from '@docusaurus/theme-common'; diff --git a/packages/docusaurus-theme-classic/src/theme/BlogPostItem/Header/Authors/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogPostItem/Header/Authors/index.tsx index aad837ea3d95..67f6b2632ea4 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogPostItem/Header/Authors/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogPostItem/Header/Authors/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {useBlogPost} from '@docusaurus/plugin-content-blog/client'; import BlogAuthor from '@theme/Blog/Components/Author'; diff --git a/packages/docusaurus-theme-classic/src/theme/BlogPostItem/Header/Info/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogPostItem/Header/Info/index.tsx index bfa12910a78e..587aee0f74ed 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogPostItem/Header/Info/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogPostItem/Header/Info/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {translate} from '@docusaurus/Translate'; import {usePluralForm} from '@docusaurus/theme-common'; diff --git a/packages/docusaurus-theme-classic/src/theme/BlogPostItem/Header/Title/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogPostItem/Header/Title/index.tsx index 0c604143c10e..fc4e681d55e8 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogPostItem/Header/Title/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogPostItem/Header/Title/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import Link from '@docusaurus/Link'; import {useBlogPost} from '@docusaurus/plugin-content-blog/client'; diff --git a/packages/docusaurus-theme-classic/src/theme/BlogPostItem/Header/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogPostItem/Header/index.tsx index 0ff0ccb04ca0..cbf1f16dfe95 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogPostItem/Header/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogPostItem/Header/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import BlogPostItemHeaderTitle from '@theme/BlogPostItem/Header/Title'; import BlogPostItemHeaderInfo from '@theme/BlogPostItem/Header/Info'; import BlogPostItemHeaderAuthors from '@theme/BlogPostItem/Header/Authors'; diff --git a/packages/docusaurus-theme-classic/src/theme/BlogPostItem/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogPostItem/index.tsx index cbdcaf443a4e..b2f2667f0571 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogPostItem/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogPostItem/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {useBlogPost} from '@docusaurus/plugin-content-blog/client'; import BlogPostItemContainer from '@theme/BlogPostItem/Container'; diff --git a/packages/docusaurus-theme-classic/src/theme/BlogPostItems/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogPostItems/index.tsx index 8e97348b456c..296f5d02f7d0 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogPostItems/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogPostItems/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {BlogPostProvider} from '@docusaurus/plugin-content-blog/client'; import BlogPostItem from '@theme/BlogPostItem'; import type {Props} from '@theme/BlogPostItems'; diff --git a/packages/docusaurus-theme-classic/src/theme/BlogPostPage/Metadata/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogPostPage/Metadata/index.tsx index abe5d74a1240..4fe0a9656e6b 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogPostPage/Metadata/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogPostPage/Metadata/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {PageMetadata} from '@docusaurus/theme-common'; import {useBlogPost} from '@docusaurus/plugin-content-blog/client'; diff --git a/packages/docusaurus-theme-classic/src/theme/BlogPostPage/StructuredData/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogPostPage/StructuredData/index.tsx index 1f8aabc9a39c..4d725f6b8138 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogPostPage/StructuredData/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogPostPage/StructuredData/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Head from '@docusaurus/Head'; import {useBlogPostStructuredData} from '@docusaurus/plugin-content-blog/client'; diff --git a/packages/docusaurus-theme-classic/src/theme/BlogPostPage/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogPostPage/index.tsx index 28f37a421b79..884c897a314f 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogPostPage/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogPostPage/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {HtmlClassNameProvider, ThemeClassNames} from '@docusaurus/theme-common'; import { diff --git a/packages/docusaurus-theme-classic/src/theme/BlogPostPaginator/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogPostPaginator/index.tsx index bf49ec144669..9fbffd84075c 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogPostPaginator/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogPostPaginator/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Translate, {translate} from '@docusaurus/Translate'; import PaginatorNavLink from '@theme/PaginatorNavLink'; import type {Props} from '@theme/BlogPostPaginator'; diff --git a/packages/docusaurus-theme-classic/src/theme/BlogSidebar/Content/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogSidebar/Content/index.tsx index d51bc276abf2..44fe6dd34395 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogSidebar/Content/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogSidebar/Content/index.tsx @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -import React, {memo, type ReactNode} from 'react'; +import {memo, type ReactNode} from 'react'; import {useThemeConfig} from '@docusaurus/theme-common'; import {groupBlogSidebarItemsByYear} from '@docusaurus/plugin-content-blog/client'; import Heading from '@theme/Heading'; diff --git a/packages/docusaurus-theme-classic/src/theme/BlogSidebar/Desktop/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogSidebar/Desktop/index.tsx index e6102e18bd7d..fed275599331 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogSidebar/Desktop/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogSidebar/Desktop/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {memo} from 'react'; +import {memo} from 'react'; import clsx from 'clsx'; import {translate} from '@docusaurus/Translate'; import { diff --git a/packages/docusaurus-theme-classic/src/theme/BlogSidebar/Mobile/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogSidebar/Mobile/index.tsx index 27549b06c60e..ce237c7a24af 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogSidebar/Mobile/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogSidebar/Mobile/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {memo, type ReactNode} from 'react'; +import {memo, type ReactNode} from 'react'; import { useVisibleBlogSidebarItems, BlogSidebarItemList, diff --git a/packages/docusaurus-theme-classic/src/theme/BlogSidebar/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogSidebar/index.tsx index b4d586abe004..32a7af5845ed 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogSidebar/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogSidebar/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {useWindowSize} from '@docusaurus/theme-common'; import BlogSidebarDesktop from '@theme/BlogSidebar/Desktop'; import BlogSidebarMobile from '@theme/BlogSidebar/Mobile'; diff --git a/packages/docusaurus-theme-classic/src/theme/BlogTagsListPage/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogTagsListPage/index.tsx index 28e13b1b91f9..50220d7fbc9b 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogTagsListPage/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogTagsListPage/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import { PageMetadata, diff --git a/packages/docusaurus-theme-classic/src/theme/BlogTagsPostsPage/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogTagsPostsPage/index.tsx index 3f54a9ff5f23..7dbe00b6c6fc 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogTagsPostsPage/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogTagsPostsPage/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import { PageMetadata, diff --git a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Buttons/Button/index.tsx b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Buttons/Button/index.tsx index 167bd3395db3..738423ab7b51 100644 --- a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Buttons/Button/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Buttons/Button/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import type {Props} from '@theme/CodeBlock/Buttons/Button'; diff --git a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Buttons/CopyButton/index.tsx b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Buttons/CopyButton/index.tsx index 849b9fa32017..445bf5954423 100644 --- a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Buttons/CopyButton/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Buttons/CopyButton/index.tsx @@ -5,13 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, { - useCallback, - useState, - useRef, - useEffect, - type ReactNode, -} from 'react'; +import {useCallback, useState, useRef, useEffect, type ReactNode} from 'react'; import clsx from 'clsx'; import {translate} from '@docusaurus/Translate'; import {useCodeBlockContext} from '@docusaurus/theme-common/internal'; diff --git a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Buttons/WordWrapButton/index.tsx b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Buttons/WordWrapButton/index.tsx index 1ca6519f3636..6670837050ee 100644 --- a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Buttons/WordWrapButton/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Buttons/WordWrapButton/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {translate} from '@docusaurus/Translate'; import {useCodeBlockContext} from '@docusaurus/theme-common/internal'; diff --git a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Buttons/index.tsx b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Buttons/index.tsx index 5372dc841092..95fd0cfc655c 100644 --- a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Buttons/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Buttons/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import BrowserOnly from '@docusaurus/BrowserOnly'; diff --git a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Container/index.tsx b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Container/index.tsx index 0c87b4188ca3..fdbe131abdb8 100644 --- a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Container/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Container/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ComponentProps, type ReactNode} from 'react'; +import type {ComponentProps, ReactNode} from 'react'; import clsx from 'clsx'; import {ThemeClassNames, usePrismTheme} from '@docusaurus/theme-common'; import {getPrismCssVariables} from '@docusaurus/theme-common/internal'; diff --git a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Content/Element.tsx b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Content/Element.tsx index e0a952bcb341..fce4dbe737f9 100644 --- a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Content/Element.tsx +++ b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Content/Element.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import Container from '@theme/CodeBlock/Container'; import type {Props} from '@theme/CodeBlock/Content/Element'; diff --git a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Content/String.tsx b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Content/String.tsx index 8e4317213436..b563a9e41833 100644 --- a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Content/String.tsx +++ b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Content/String.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {useThemeConfig} from '@docusaurus/theme-common'; import { CodeBlockContextProvider, diff --git a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Content/index.tsx b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Content/index.tsx index 7d73a11f812d..86dcf3f1db05 100644 --- a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Content/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Content/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ComponentProps, type ReactNode} from 'react'; +import type {ComponentProps, ReactNode} from 'react'; import clsx from 'clsx'; import {useCodeBlockContext} from '@docusaurus/theme-common/internal'; import {usePrismTheme} from '@docusaurus/theme-common'; diff --git a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Layout/index.tsx b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Layout/index.tsx index 100532faca81..4e24c3083f2e 100644 --- a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Layout/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Layout/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {useCodeBlockContext} from '@docusaurus/theme-common/internal'; import Container from '@theme/CodeBlock/Container'; diff --git a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Line/Token/index.tsx b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Line/Token/index.tsx index cdbfcb88b469..274fe19ac3c1 100644 --- a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Line/Token/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Line/Token/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import type {Props} from '@theme/CodeBlock/Line/Token'; // Pass-through components that users can swizzle and customize diff --git a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Line/index.tsx b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Line/index.tsx index 803c06466eae..844519e9d7c5 100644 --- a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Line/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Line/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import LineToken from '@theme/CodeBlock/Line/Token'; import type {Props} from '@theme/CodeBlock/Line'; diff --git a/packages/docusaurus-theme-classic/src/theme/CodeInline/index.tsx b/packages/docusaurus-theme-classic/src/theme/CodeInline/index.tsx index 3fbff5700ad9..d7b61849009a 100644 --- a/packages/docusaurus-theme-classic/src/theme/CodeInline/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/CodeInline/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import type {Props} from '@theme/CodeInline'; // Simple component used to render inline code blocks diff --git a/packages/docusaurus-theme-classic/src/theme/ContentVisibility/Draft/index.tsx b/packages/docusaurus-theme-classic/src/theme/ContentVisibility/Draft/index.tsx index 63ce3ea1b610..487b1535d587 100644 --- a/packages/docusaurus-theme-classic/src/theme/ContentVisibility/Draft/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/ContentVisibility/Draft/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import { ThemeClassNames, diff --git a/packages/docusaurus-theme-classic/src/theme/ContentVisibility/Unlisted/index.tsx b/packages/docusaurus-theme-classic/src/theme/ContentVisibility/Unlisted/index.tsx index 14d0e81fbd72..8fc5390e631b 100644 --- a/packages/docusaurus-theme-classic/src/theme/ContentVisibility/Unlisted/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/ContentVisibility/Unlisted/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import Head from '@docusaurus/Head'; import { diff --git a/packages/docusaurus-theme-classic/src/theme/ContentVisibility/index.tsx b/packages/docusaurus-theme-classic/src/theme/ContentVisibility/index.tsx index 0915c9e4e11b..aac3570e37e8 100644 --- a/packages/docusaurus-theme-classic/src/theme/ContentVisibility/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/ContentVisibility/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import type {Props} from '@theme/ContentVisibility'; import Draft from '@theme/ContentVisibility/Draft'; diff --git a/packages/docusaurus-theme-classic/src/theme/Details/index.tsx b/packages/docusaurus-theme-classic/src/theme/Details/index.tsx index 11da776988b4..3b1dbb549030 100644 --- a/packages/docusaurus-theme-classic/src/theme/Details/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Details/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {Details as DetailsGeneric} from '@docusaurus/theme-common/Details'; import type {Props} from '@theme/Details'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/Items/Home/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/Items/Home/index.tsx index 55c21a0405d4..7c0344083add 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/Items/Home/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/Items/Home/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Link from '@docusaurus/Link'; import useBaseUrl from '@docusaurus/useBaseUrl'; import {translate} from '@docusaurus/Translate'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/StructuredData/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/StructuredData/index.tsx index 8268619df078..62d881237e28 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/StructuredData/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/StructuredData/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Head from '@docusaurus/Head'; import {useBreadcrumbsStructuredData} from '@docusaurus/plugin-content-docs/client'; import type {Props} from '@theme/DocBreadcrumbs/StructuredData'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/index.tsx index f1d566eff4c8..7b04b478da8c 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {ThemeClassNames} from '@docusaurus/theme-common'; import {useSidebarBreadcrumbs} from '@docusaurus/plugin-content-docs/client'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocCard/Description/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocCard/Description/index.tsx index 55d2ce312b8e..756105c03cf6 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocCard/Description/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocCard/Description/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {ThemeClassNames} from '@docusaurus/theme-common'; import type {Props} from '@theme/DocCard/Description'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocCard/Heading/Icon/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocCard/Heading/Icon/index.tsx index d646aa277082..60034f858c35 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocCard/Heading/Icon/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocCard/Heading/Icon/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {ThemeClassNames} from '@docusaurus/theme-common'; import type {Props} from '@theme/DocCard/Heading/Icon'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocCard/Heading/Text/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocCard/Heading/Text/index.tsx index 9b091534331f..d2d383cfd622 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocCard/Heading/Text/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocCard/Heading/Text/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {ThemeClassNames} from '@docusaurus/theme-common'; import type {Props} from '@theme/DocCard/Heading/Text'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocCard/Heading/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocCard/Heading/index.tsx index 7e5487e3ff9c..7a10203c409e 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocCard/Heading/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocCard/Heading/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {ThemeClassNames} from '@docusaurus/theme-common'; import Heading from '@theme/Heading'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocCard/Layout/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocCard/Layout/index.tsx index 448ec09921c8..ea2b569e791a 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocCard/Layout/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocCard/Layout/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import Link from '@docusaurus/Link'; import {ThemeClassNames} from '@docusaurus/theme-common'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocCard/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocCard/index.tsx index f41e9aac614a..3c60b50807c4 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocCard/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocCard/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import { useDocById, findFirstSidebarItemLink, diff --git a/packages/docusaurus-theme-classic/src/theme/DocCardList/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocCardList/index.tsx index f050acf3a47b..5541b2801800 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocCardList/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocCardList/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ComponentProps, type ReactNode} from 'react'; +import type {ComponentProps, ReactNode} from 'react'; import clsx from 'clsx'; import { useCurrentSidebarSiblings, diff --git a/packages/docusaurus-theme-classic/src/theme/DocCategoryGeneratedIndexPage/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocCategoryGeneratedIndexPage/index.tsx index 58ba798b30b9..a8c9c4741a01 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocCategoryGeneratedIndexPage/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocCategoryGeneratedIndexPage/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {PageMetadata} from '@docusaurus/theme-common'; import {useCurrentSidebarCategory} from '@docusaurus/plugin-content-docs/client'; import useBaseUrl from '@docusaurus/useBaseUrl'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocItem/Content/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocItem/Content/index.tsx index 97aba92df553..d0e278858be9 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocItem/Content/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocItem/Content/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {ThemeClassNames} from '@docusaurus/theme-common'; import {useDoc} from '@docusaurus/plugin-content-docs/client'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocItem/Footer/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocItem/Footer/index.tsx index e497c85c0cee..2744173b718e 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocItem/Footer/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocItem/Footer/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {ThemeClassNames} from '@docusaurus/theme-common'; import {useDoc} from '@docusaurus/plugin-content-docs/client'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocItem/Layout/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocItem/Layout/index.tsx index 8322d71956c3..0e7511f9930d 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocItem/Layout/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocItem/Layout/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {useWindowSize} from '@docusaurus/theme-common'; import {useDoc} from '@docusaurus/plugin-content-docs/client'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocItem/Metadata/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocItem/Metadata/index.tsx index f0f22f17103e..e959827abdc1 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocItem/Metadata/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocItem/Metadata/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {PageMetadata} from '@docusaurus/theme-common'; import {useDoc} from '@docusaurus/plugin-content-docs/client'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocItem/Paginator/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocItem/Paginator/index.tsx index 8886f762a53a..d8932681d6f4 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocItem/Paginator/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocItem/Paginator/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {useDoc} from '@docusaurus/plugin-content-docs/client'; import DocPaginator from '@theme/DocPaginator'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocItem/TOC/Desktop/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocItem/TOC/Desktop/index.tsx index 827780f459a8..9d789660b93b 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocItem/TOC/Desktop/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocItem/TOC/Desktop/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {ThemeClassNames} from '@docusaurus/theme-common'; import {useDoc} from '@docusaurus/plugin-content-docs/client'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocItem/TOC/Mobile/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocItem/TOC/Mobile/index.tsx index 755a8fe7fb84..6d3da5e18fb1 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocItem/TOC/Mobile/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocItem/TOC/Mobile/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {ThemeClassNames} from '@docusaurus/theme-common'; import {useDoc} from '@docusaurus/plugin-content-docs/client'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocItem/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocItem/index.tsx index f39fa1d19ff5..b4a121b57ab7 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocItem/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocItem/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {HtmlClassNameProvider} from '@docusaurus/theme-common'; import {DocProvider} from '@docusaurus/plugin-content-docs/client'; import DocItemMetadata from '@theme/DocItem/Metadata'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocPaginator/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocPaginator/index.tsx index a915de37efd9..28af4c6ee2f9 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocPaginator/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocPaginator/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import Translate, {translate} from '@docusaurus/Translate'; import PaginatorNavLink from '@theme/PaginatorNavLink'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocRoot/Layout/Main/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocRoot/Layout/Main/index.tsx index 0c349406b172..2017472fde79 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocRoot/Layout/Main/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocRoot/Layout/Main/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {useDocsSidebar} from '@docusaurus/plugin-content-docs/client'; import type {Props} from '@theme/DocRoot/Layout/Main'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocRoot/Layout/Sidebar/ExpandButton/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocRoot/Layout/Sidebar/ExpandButton/index.tsx index a4a1d1bd77b8..5302d309fa63 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocRoot/Layout/Sidebar/ExpandButton/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocRoot/Layout/Sidebar/ExpandButton/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {translate} from '@docusaurus/Translate'; import IconArrow from '@theme/Icon/Arrow'; import type {Props} from '@theme/DocRoot/Layout/Sidebar/ExpandButton'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocRoot/Layout/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocRoot/Layout/index.tsx index 2287206fb6f4..1c0b8b8d3529 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocRoot/Layout/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocRoot/Layout/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode, useState} from 'react'; +import {type ReactNode, useState} from 'react'; import {useDocsSidebar} from '@docusaurus/plugin-content-docs/client'; import BackToTopButton from '@theme/BackToTopButton'; import DocRootLayoutSidebar from '@theme/DocRoot/Layout/Sidebar'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocRoot/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocRoot/index.tsx index ab5fef58c450..2776997fb80d 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocRoot/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocRoot/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {HtmlClassNameProvider, ThemeClassNames} from '@docusaurus/theme-common'; import { diff --git a/packages/docusaurus-theme-classic/src/theme/DocSidebar/Desktop/CollapseButton/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocSidebar/Desktop/CollapseButton/index.tsx index cf6d2755fc16..9bfd2df8476a 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocSidebar/Desktop/CollapseButton/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocSidebar/Desktop/CollapseButton/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {translate} from '@docusaurus/Translate'; import IconArrow from '@theme/Icon/Arrow'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocSidebar/Desktop/Content/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocSidebar/Desktop/Content/index.tsx index 50da5fedb280..d4393b6f381f 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocSidebar/Desktop/Content/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocSidebar/Desktop/Content/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode, useState} from 'react'; +import {type ReactNode, useState} from 'react'; import clsx from 'clsx'; import {ThemeClassNames} from '@docusaurus/theme-common'; import { diff --git a/packages/docusaurus-theme-classic/src/theme/DocSidebar/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocSidebar/index.tsx index eae6d670e20d..2068fc48ac7e 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocSidebar/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocSidebar/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {useWindowSize} from '@docusaurus/theme-common'; import DocSidebarDesktop from '@theme/DocSidebar/Desktop'; import DocSidebarMobile from '@theme/DocSidebar/Mobile'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Category/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Category/index.tsx index c2866f042ca3..078bc5953626 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Category/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Category/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, { +import { type ComponentProps, type ReactNode, useEffect, diff --git a/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Html/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Html/index.tsx index 19a72d6ccd8c..0928d230b696 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Html/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Html/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {ThemeClassNames} from '@docusaurus/theme-common'; import type {Props} from '@theme/DocSidebarItem/Html'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Link/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Link/index.tsx index 629b3ef7f884..511fc705fcc1 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Link/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Link/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {ThemeClassNames} from '@docusaurus/theme-common'; import {isActiveSidebarItem} from '@docusaurus/plugin-content-docs/client'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/index.tsx index 6181a75e564d..13ed3de3d844 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import DocSidebarItemCategory from '@theme/DocSidebarItem/Category'; import DocSidebarItemLink from '@theme/DocSidebarItem/Link'; import DocSidebarItemHtml from '@theme/DocSidebarItem/Html'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocSidebarItems/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocSidebarItems/index.tsx index d4531ac98052..ad7bdedf0571 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocSidebarItems/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocSidebarItems/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {memo, type ReactNode} from 'react'; +import {memo, type ReactNode} from 'react'; import { DocSidebarItemsExpandedStateProvider, useVisibleSidebarItems, diff --git a/packages/docusaurus-theme-classic/src/theme/DocTagDocListPage/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocTagDocListPage/index.tsx index 1431f6a6aaae..b0e325903fe4 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocTagDocListPage/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocTagDocListPage/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import Link from '@docusaurus/Link'; import { diff --git a/packages/docusaurus-theme-classic/src/theme/DocTagsListPage/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocTagsListPage/index.tsx index 8197c1f40943..977d314adc45 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocTagsListPage/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocTagsListPage/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import { PageMetadata, diff --git a/packages/docusaurus-theme-classic/src/theme/DocVersionBadge/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocVersionBadge/index.tsx index c2dd54546e05..80a55f8d65c7 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocVersionBadge/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocVersionBadge/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import Translate from '@docusaurus/Translate'; import {ThemeClassNames} from '@docusaurus/theme-common'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocVersionBanner/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocVersionBanner/index.tsx index cc02411e0841..99af8fd01b40 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocVersionBanner/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocVersionBanner/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ComponentType, type ReactNode} from 'react'; +import type {ComponentType, ReactNode} from 'react'; import clsx from 'clsx'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import Link from '@docusaurus/Link'; diff --git a/packages/docusaurus-theme-classic/src/theme/DocVersionRoot/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocVersionRoot/index.tsx index 7e13cce3cb9f..10893bd95989 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocVersionRoot/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocVersionRoot/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {HtmlClassNameProvider, PageMetadata} from '@docusaurus/theme-common'; import { getDocsVersionSearchTag, diff --git a/packages/docusaurus-theme-classic/src/theme/DocsRoot/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocsRoot/index.tsx index 12f4a435571d..9a8cc343012d 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocsRoot/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocsRoot/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {ThemeClassNames, HtmlClassNameProvider} from '@docusaurus/theme-common'; import renderRoutes from '@docusaurus/renderRoutes'; diff --git a/packages/docusaurus-theme-classic/src/theme/EditMetaRow/index.tsx b/packages/docusaurus-theme-classic/src/theme/EditMetaRow/index.tsx index d12ef51abfa2..852391178a5d 100644 --- a/packages/docusaurus-theme-classic/src/theme/EditMetaRow/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/EditMetaRow/index.tsx @@ -4,7 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; + +import type {ReactNode} from 'react'; import clsx from 'clsx'; import EditThisPage from '@theme/EditThisPage'; import type {Props} from '@theme/EditMetaRow'; diff --git a/packages/docusaurus-theme-classic/src/theme/EditThisPage/index.tsx b/packages/docusaurus-theme-classic/src/theme/EditThisPage/index.tsx index 1d0e58934914..96e9cdd506ee 100644 --- a/packages/docusaurus-theme-classic/src/theme/EditThisPage/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/EditThisPage/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Translate from '@docusaurus/Translate'; import {ThemeClassNames} from '@docusaurus/theme-common'; import Link from '@docusaurus/Link'; diff --git a/packages/docusaurus-theme-classic/src/theme/ErrorPageContent.tsx b/packages/docusaurus-theme-classic/src/theme/ErrorPageContent.tsx index ba629d8c26d6..db38e43a487a 100644 --- a/packages/docusaurus-theme-classic/src/theme/ErrorPageContent.tsx +++ b/packages/docusaurus-theme-classic/src/theme/ErrorPageContent.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Translate from '@docusaurus/Translate'; import { ErrorBoundaryError, diff --git a/packages/docusaurus-theme-classic/src/theme/Footer/Copyright/index.tsx b/packages/docusaurus-theme-classic/src/theme/Footer/Copyright/index.tsx index 92c9ef21bdcf..3c8ceeca032a 100644 --- a/packages/docusaurus-theme-classic/src/theme/Footer/Copyright/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Footer/Copyright/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import type {Props} from '@theme/Footer/Copyright'; export default function FooterCopyright({copyright}: Props): ReactNode { diff --git a/packages/docusaurus-theme-classic/src/theme/Footer/Layout/index.tsx b/packages/docusaurus-theme-classic/src/theme/Footer/Layout/index.tsx index ae9c42b60607..fb49f9ea74cc 100644 --- a/packages/docusaurus-theme-classic/src/theme/Footer/Layout/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Footer/Layout/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {ThemeClassNames} from '@docusaurus/theme-common'; import type {Props} from '@theme/Footer/Layout'; diff --git a/packages/docusaurus-theme-classic/src/theme/Footer/LinkItem/index.tsx b/packages/docusaurus-theme-classic/src/theme/Footer/LinkItem/index.tsx index ac4f6b488dd3..c72beb6e0401 100644 --- a/packages/docusaurus-theme-classic/src/theme/Footer/LinkItem/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Footer/LinkItem/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import Link from '@docusaurus/Link'; import useBaseUrl from '@docusaurus/useBaseUrl'; diff --git a/packages/docusaurus-theme-classic/src/theme/Footer/Links/MultiColumn/index.tsx b/packages/docusaurus-theme-classic/src/theme/Footer/Links/MultiColumn/index.tsx index e80d43041ba3..be4f27c6a503 100644 --- a/packages/docusaurus-theme-classic/src/theme/Footer/Links/MultiColumn/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Footer/Links/MultiColumn/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {ThemeClassNames} from '@docusaurus/theme-common'; import LinkItem from '@theme/Footer/LinkItem'; diff --git a/packages/docusaurus-theme-classic/src/theme/Footer/Links/index.tsx b/packages/docusaurus-theme-classic/src/theme/Footer/Links/index.tsx index 203f2b773f02..9d0907f404d7 100644 --- a/packages/docusaurus-theme-classic/src/theme/Footer/Links/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Footer/Links/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {isMultiColumnFooterLinks} from '@docusaurus/theme-common'; import FooterLinksMultiColumn from '@theme/Footer/Links/MultiColumn'; diff --git a/packages/docusaurus-theme-classic/src/theme/Footer/Logo/index.tsx b/packages/docusaurus-theme-classic/src/theme/Footer/Logo/index.tsx index 85d7b0d670d7..5a004837e1d5 100644 --- a/packages/docusaurus-theme-classic/src/theme/Footer/Logo/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Footer/Logo/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import Link from '@docusaurus/Link'; import {useBaseUrlUtils} from '@docusaurus/useBaseUrl'; diff --git a/packages/docusaurus-theme-classic/src/theme/Heading/index.tsx b/packages/docusaurus-theme-classic/src/theme/Heading/index.tsx index 415cd65f2e99..4fef90bbdda2 100644 --- a/packages/docusaurus-theme-classic/src/theme/Heading/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Heading/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {translate} from '@docusaurus/Translate'; import {useAnchorTargetClassName} from '@docusaurus/theme-common'; diff --git a/packages/docusaurus-theme-classic/src/theme/Icon/Arrow/index.tsx b/packages/docusaurus-theme-classic/src/theme/Icon/Arrow/index.tsx index 3fda5f9aa599..9022a4284633 100644 --- a/packages/docusaurus-theme-classic/src/theme/Icon/Arrow/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Icon/Arrow/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import type {Props} from '@theme/Icon/Arrow'; export default function IconArrow(props: Props): ReactNode { diff --git a/packages/docusaurus-theme-classic/src/theme/Icon/Close/index.tsx b/packages/docusaurus-theme-classic/src/theme/Icon/Close/index.tsx index 3858c40dfbfa..75321ee590ac 100644 --- a/packages/docusaurus-theme-classic/src/theme/Icon/Close/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Icon/Close/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import type {Props} from '@theme/Icon/Close'; export default function IconClose({ diff --git a/packages/docusaurus-theme-classic/src/theme/Icon/Copy/index.tsx b/packages/docusaurus-theme-classic/src/theme/Icon/Copy/index.tsx index 87f954403e67..971ba2c1f986 100644 --- a/packages/docusaurus-theme-classic/src/theme/Icon/Copy/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Icon/Copy/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import type {Props} from '@theme/Icon/Copy'; export default function IconCopy(props: Props): ReactNode { diff --git a/packages/docusaurus-theme-classic/src/theme/Icon/DarkMode/index.tsx b/packages/docusaurus-theme-classic/src/theme/Icon/DarkMode/index.tsx index 2c2092d91485..5019031b16d5 100644 --- a/packages/docusaurus-theme-classic/src/theme/Icon/DarkMode/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Icon/DarkMode/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import type {Props} from '@theme/Icon/DarkMode'; export default function IconDarkMode(props: Props): ReactNode { diff --git a/packages/docusaurus-theme-classic/src/theme/Icon/Edit/index.tsx b/packages/docusaurus-theme-classic/src/theme/Icon/Edit/index.tsx index 956892e6874f..94ffb9c9ec5f 100644 --- a/packages/docusaurus-theme-classic/src/theme/Icon/Edit/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Icon/Edit/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import type {Props} from '@theme/Icon/Edit'; diff --git a/packages/docusaurus-theme-classic/src/theme/Icon/ExternalLink/index.tsx b/packages/docusaurus-theme-classic/src/theme/Icon/ExternalLink/index.tsx index b899a1fee742..19f5ffea34cf 100644 --- a/packages/docusaurus-theme-classic/src/theme/Icon/ExternalLink/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Icon/ExternalLink/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {translate} from '@docusaurus/Translate'; import type {Props} from '@theme/Icon/ExternalLink'; diff --git a/packages/docusaurus-theme-classic/src/theme/Icon/Home/index.tsx b/packages/docusaurus-theme-classic/src/theme/Icon/Home/index.tsx index 28050567827f..b892f1cea59e 100644 --- a/packages/docusaurus-theme-classic/src/theme/Icon/Home/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Icon/Home/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import type {Props} from '@theme/Icon/Home'; export default function IconHome(props: Props): ReactNode { diff --git a/packages/docusaurus-theme-classic/src/theme/Icon/Language/index.tsx b/packages/docusaurus-theme-classic/src/theme/Icon/Language/index.tsx index 354ab3580e8a..6b4f364a3fba 100644 --- a/packages/docusaurus-theme-classic/src/theme/Icon/Language/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Icon/Language/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import type {Props} from '@theme/Icon/Language'; export default function IconLanguage({ diff --git a/packages/docusaurus-theme-classic/src/theme/Icon/LightMode/index.tsx b/packages/docusaurus-theme-classic/src/theme/Icon/LightMode/index.tsx index f24c0ebfde8e..c3f4c685688c 100644 --- a/packages/docusaurus-theme-classic/src/theme/Icon/LightMode/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Icon/LightMode/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import type {Props} from '@theme/Icon/LightMode'; export default function IconLightMode(props: Props): ReactNode { diff --git a/packages/docusaurus-theme-classic/src/theme/Icon/Menu/index.tsx b/packages/docusaurus-theme-classic/src/theme/Icon/Menu/index.tsx index 76bba69f50a5..bea337551497 100644 --- a/packages/docusaurus-theme-classic/src/theme/Icon/Menu/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Icon/Menu/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import type {Props} from '@theme/Icon/Menu'; export default function IconMenu({ diff --git a/packages/docusaurus-theme-classic/src/theme/Icon/Success/index.tsx b/packages/docusaurus-theme-classic/src/theme/Icon/Success/index.tsx index 297e25158279..fe52a3a3f8a9 100644 --- a/packages/docusaurus-theme-classic/src/theme/Icon/Success/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Icon/Success/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import type {Props} from '@theme/Icon/Success'; export default function IconSuccess(props: Props): ReactNode { diff --git a/packages/docusaurus-theme-classic/src/theme/Icon/WordWrap/index.tsx b/packages/docusaurus-theme-classic/src/theme/Icon/WordWrap/index.tsx index dfcba38debd5..72e2e74de157 100644 --- a/packages/docusaurus-theme-classic/src/theme/Icon/WordWrap/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Icon/WordWrap/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import type {Props} from '@theme/Icon/WordWrap'; export default function IconWordWrap(props: Props): ReactNode { diff --git a/packages/docusaurus-theme-classic/src/theme/LastUpdated/index.tsx b/packages/docusaurus-theme-classic/src/theme/LastUpdated/index.tsx index b454863587be..6f984f9931e4 100644 --- a/packages/docusaurus-theme-classic/src/theme/LastUpdated/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/LastUpdated/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Translate from '@docusaurus/Translate'; import {ThemeClassNames} from '@docusaurus/theme-common'; import {useDateTimeFormat} from '@docusaurus/theme-common/internal'; diff --git a/packages/docusaurus-theme-classic/src/theme/Layout/Provider/index.tsx b/packages/docusaurus-theme-classic/src/theme/Layout/Provider/index.tsx index 992468ade2e7..4f68ffeb91e0 100644 --- a/packages/docusaurus-theme-classic/src/theme/Layout/Provider/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Layout/Provider/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {composeProviders} from '@docusaurus/theme-common'; import { ColorModeProvider, diff --git a/packages/docusaurus-theme-classic/src/theme/Layout/index.tsx b/packages/docusaurus-theme-classic/src/theme/Layout/index.tsx index 388f7e912769..699d04fbacbc 100644 --- a/packages/docusaurus-theme-classic/src/theme/Layout/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Layout/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import ErrorBoundary from '@docusaurus/ErrorBoundary'; import { diff --git a/packages/docusaurus-theme-classic/src/theme/Logo/index.tsx b/packages/docusaurus-theme-classic/src/theme/Logo/index.tsx index 096541164c6b..663c8dd64203 100644 --- a/packages/docusaurus-theme-classic/src/theme/Logo/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Logo/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Link from '@docusaurus/Link'; import useBaseUrl from '@docusaurus/useBaseUrl'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; diff --git a/packages/docusaurus-theme-classic/src/theme/MDXComponents/A/index.tsx b/packages/docusaurus-theme-classic/src/theme/MDXComponents/A/index.tsx index d794daaeeeb6..fd47ffe37602 100644 --- a/packages/docusaurus-theme-classic/src/theme/MDXComponents/A/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/MDXComponents/A/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import Link from '@docusaurus/Link'; import {useAnchorTargetClassName} from '@docusaurus/theme-common'; diff --git a/packages/docusaurus-theme-classic/src/theme/MDXComponents/Heading.tsx b/packages/docusaurus-theme-classic/src/theme/MDXComponents/Heading.tsx index ecd3612f843e..272bcd82caed 100644 --- a/packages/docusaurus-theme-classic/src/theme/MDXComponents/Heading.tsx +++ b/packages/docusaurus-theme-classic/src/theme/MDXComponents/Heading.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Heading from '@theme/Heading'; import type {Props} from '@theme/MDXComponents/Heading'; diff --git a/packages/docusaurus-theme-classic/src/theme/MDXComponents/Img/index.tsx b/packages/docusaurus-theme-classic/src/theme/MDXComponents/Img/index.tsx index a0e6c3bd8409..a81abb0d19d4 100644 --- a/packages/docusaurus-theme-classic/src/theme/MDXComponents/Img/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/MDXComponents/Img/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import type {Props} from '@theme/MDXComponents/Img'; diff --git a/packages/docusaurus-theme-classic/src/theme/MDXComponents/Li.tsx b/packages/docusaurus-theme-classic/src/theme/MDXComponents/Li.tsx index bb2a3d64978a..5f6252c384b7 100644 --- a/packages/docusaurus-theme-classic/src/theme/MDXComponents/Li.tsx +++ b/packages/docusaurus-theme-classic/src/theme/MDXComponents/Li.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import useBrokenLinks from '@docusaurus/useBrokenLinks'; import {useAnchorTargetClassName} from '@docusaurus/theme-common'; diff --git a/packages/docusaurus-theme-classic/src/theme/MDXComponents/Pre.tsx b/packages/docusaurus-theme-classic/src/theme/MDXComponents/Pre.tsx index 69957ea29f55..2774a16c61fb 100644 --- a/packages/docusaurus-theme-classic/src/theme/MDXComponents/Pre.tsx +++ b/packages/docusaurus-theme-classic/src/theme/MDXComponents/Pre.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import type {Props} from '@theme/MDXComponents/Pre'; export default function MDXPre(props: Props): ReactNode | undefined { diff --git a/packages/docusaurus-theme-classic/src/theme/MDXComponents/Ul/index.tsx b/packages/docusaurus-theme-classic/src/theme/MDXComponents/Ul/index.tsx index 3b4785b55fa8..951308c8009e 100644 --- a/packages/docusaurus-theme-classic/src/theme/MDXComponents/Ul/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/MDXComponents/Ul/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import type {Props} from '@theme/MDXComponents/Ul'; diff --git a/packages/docusaurus-theme-classic/src/theme/MDXComponents/index.tsx b/packages/docusaurus-theme-classic/src/theme/MDXComponents/index.tsx index 49d438bc5f68..d57df15a0f11 100644 --- a/packages/docusaurus-theme-classic/src/theme/MDXComponents/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/MDXComponents/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ComponentProps} from 'react'; +import type {ComponentProps} from 'react'; import Head from '@docusaurus/Head'; import MDXCode from '@theme/MDXComponents/Code'; import MDXA from '@theme/MDXComponents/A'; diff --git a/packages/docusaurus-theme-classic/src/theme/MDXContent/index.tsx b/packages/docusaurus-theme-classic/src/theme/MDXContent/index.tsx index 3b2b7abe7563..1e50bb5a6614 100644 --- a/packages/docusaurus-theme-classic/src/theme/MDXContent/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/MDXContent/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {MDXProvider} from '@mdx-js/react'; import MDXComponents from '@theme/MDXComponents'; import type {Props} from '@theme/MDXContent'; diff --git a/packages/docusaurus-theme-classic/src/theme/MDXPage/index.tsx b/packages/docusaurus-theme-classic/src/theme/MDXPage/index.tsx index a862907dc8b8..5f3c0d416198 100644 --- a/packages/docusaurus-theme-classic/src/theme/MDXPage/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/MDXPage/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import { PageMetadata, diff --git a/packages/docusaurus-theme-classic/src/theme/Navbar/ColorModeToggle/index.tsx b/packages/docusaurus-theme-classic/src/theme/Navbar/ColorModeToggle/index.tsx index 5250543f767d..c0ff6fb8d332 100644 --- a/packages/docusaurus-theme-classic/src/theme/Navbar/ColorModeToggle/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Navbar/ColorModeToggle/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {useColorMode, useThemeConfig} from '@docusaurus/theme-common'; import ColorModeToggle from '@theme/ColorModeToggle'; import type {Props} from '@theme/Navbar/ColorModeToggle'; diff --git a/packages/docusaurus-theme-classic/src/theme/Navbar/Content/index.tsx b/packages/docusaurus-theme-classic/src/theme/Navbar/Content/index.tsx index 10c97a763290..47600c662250 100644 --- a/packages/docusaurus-theme-classic/src/theme/Navbar/Content/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Navbar/Content/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import { useThemeConfig, diff --git a/packages/docusaurus-theme-classic/src/theme/Navbar/Layout/index.tsx b/packages/docusaurus-theme-classic/src/theme/Navbar/Layout/index.tsx index bc05e5154216..a79d2a2d0327 100644 --- a/packages/docusaurus-theme-classic/src/theme/Navbar/Layout/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Navbar/Layout/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ComponentProps, type ReactNode} from 'react'; +import type {ComponentProps, ReactNode} from 'react'; import clsx from 'clsx'; import {ThemeClassNames, useThemeConfig} from '@docusaurus/theme-common'; import { diff --git a/packages/docusaurus-theme-classic/src/theme/Navbar/Logo/index.tsx b/packages/docusaurus-theme-classic/src/theme/Navbar/Logo/index.tsx index 81e0cfd9f872..3bdd1b441c84 100644 --- a/packages/docusaurus-theme-classic/src/theme/Navbar/Logo/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Navbar/Logo/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Logo from '@theme/Logo'; export default function NavbarLogo(): ReactNode { diff --git a/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/Header/index.tsx b/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/Header/index.tsx index f58b84920abb..ec1ad768971c 100644 --- a/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/Header/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/Header/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {useNavbarMobileSidebar} from '@docusaurus/theme-common/internal'; import {translate} from '@docusaurus/Translate'; import NavbarColorModeToggle from '@theme/Navbar/ColorModeToggle'; diff --git a/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/Layout/index.tsx b/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/Layout/index.tsx index 1bea082075d2..972eaba449d0 100644 --- a/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/Layout/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/Layout/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {useNavbarSecondaryMenu} from '@docusaurus/theme-common/internal'; import {ThemeClassNames} from '@docusaurus/theme-common'; diff --git a/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/PrimaryMenu/index.tsx b/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/PrimaryMenu/index.tsx index 22e5622b4dc6..b9df8e3881df 100644 --- a/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/PrimaryMenu/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/PrimaryMenu/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {useThemeConfig} from '@docusaurus/theme-common'; import {useNavbarMobileSidebar} from '@docusaurus/theme-common/internal'; import NavbarItem, {type Props as NavbarItemConfig} from '@theme/NavbarItem'; diff --git a/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/SecondaryMenu/index.tsx b/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/SecondaryMenu/index.tsx index 4652438e625a..59313a1503fe 100644 --- a/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/SecondaryMenu/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/SecondaryMenu/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ComponentProps, type ReactNode} from 'react'; +import type {ComponentProps, ReactNode} from 'react'; import {useThemeConfig} from '@docusaurus/theme-common'; import {useNavbarSecondaryMenu} from '@docusaurus/theme-common/internal'; import Translate from '@docusaurus/Translate'; diff --git a/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/Toggle/index.tsx b/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/Toggle/index.tsx index 56c3262a0442..9cf08f7636e4 100644 --- a/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/Toggle/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/Toggle/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {useNavbarMobileSidebar} from '@docusaurus/theme-common/internal'; import {translate} from '@docusaurus/Translate'; import IconMenu from '@theme/Icon/Menu'; diff --git a/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/index.tsx b/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/index.tsx index fa571f387372..a4d73a49c583 100644 --- a/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import { useLockBodyScroll, useNavbarMobileSidebar, diff --git a/packages/docusaurus-theme-classic/src/theme/Navbar/Search/index.tsx b/packages/docusaurus-theme-classic/src/theme/Navbar/Search/index.tsx index 680d1b56f1f8..e24fc71b555d 100644 --- a/packages/docusaurus-theme-classic/src/theme/Navbar/Search/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Navbar/Search/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import type {Props} from '@theme/Navbar/Search'; diff --git a/packages/docusaurus-theme-classic/src/theme/Navbar/index.tsx b/packages/docusaurus-theme-classic/src/theme/Navbar/index.tsx index e68cb9418ec7..99b9e47eaa9f 100644 --- a/packages/docusaurus-theme-classic/src/theme/Navbar/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Navbar/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import NavbarLayout from '@theme/Navbar/Layout'; import NavbarContent from '@theme/Navbar/Content'; diff --git a/packages/docusaurus-theme-classic/src/theme/NavbarItem/DefaultNavbarItem/Desktop/index.tsx b/packages/docusaurus-theme-classic/src/theme/NavbarItem/DefaultNavbarItem/Desktop/index.tsx index de9ab826e0f6..ff8eb383a1eb 100644 --- a/packages/docusaurus-theme-classic/src/theme/NavbarItem/DefaultNavbarItem/Desktop/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/NavbarItem/DefaultNavbarItem/Desktop/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import NavbarNavLink from '@theme/NavbarItem/NavbarNavLink'; import type {Props} from '@theme/NavbarItem/DefaultNavbarItem/Desktop'; diff --git a/packages/docusaurus-theme-classic/src/theme/NavbarItem/DefaultNavbarItem/Mobile/index.tsx b/packages/docusaurus-theme-classic/src/theme/NavbarItem/DefaultNavbarItem/Mobile/index.tsx index 5d37c0487d8b..8949040e10da 100644 --- a/packages/docusaurus-theme-classic/src/theme/NavbarItem/DefaultNavbarItem/Mobile/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/NavbarItem/DefaultNavbarItem/Mobile/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import NavbarNavLink from '@theme/NavbarItem/NavbarNavLink'; import type {Props} from '@theme/NavbarItem/DefaultNavbarItem/Mobile'; diff --git a/packages/docusaurus-theme-classic/src/theme/NavbarItem/DefaultNavbarItem/index.tsx b/packages/docusaurus-theme-classic/src/theme/NavbarItem/DefaultNavbarItem/index.tsx index ff8992bf8d3d..6639a09aeec3 100644 --- a/packages/docusaurus-theme-classic/src/theme/NavbarItem/DefaultNavbarItem/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/NavbarItem/DefaultNavbarItem/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import DefaultNavbarItemMobile from '@theme/NavbarItem/DefaultNavbarItem/Mobile'; import DefaultNavbarItemDesktop from '@theme/NavbarItem/DefaultNavbarItem/Desktop'; import type {Props} from '@theme/NavbarItem/DefaultNavbarItem'; diff --git a/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocNavbarItem.tsx b/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocNavbarItem.tsx index 568cb2e2c43d..4c5002fd2a5a 100644 --- a/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocNavbarItem.tsx +++ b/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocNavbarItem.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import { useActiveDocContext, useLayoutDoc, diff --git a/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocSidebarNavbarItem.tsx b/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocSidebarNavbarItem.tsx index 23943af1da77..a42b0a7f3523 100644 --- a/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocSidebarNavbarItem.tsx +++ b/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocSidebarNavbarItem.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import { useActiveDocContext, useLayoutDocsSidebar, diff --git a/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx b/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx index fdd28ebc251f..6ab6c148ef36 100644 --- a/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx +++ b/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import { useVersions, useActiveDocContext, diff --git a/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocsVersionNavbarItem.tsx b/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocsVersionNavbarItem.tsx index 8bd3e631b3f0..12db0db492b7 100644 --- a/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocsVersionNavbarItem.tsx +++ b/packages/docusaurus-theme-classic/src/theme/NavbarItem/DocsVersionNavbarItem.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {useDocsVersionCandidates} from '@docusaurus/plugin-content-docs/client'; import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem'; import type {Props} from '@theme/NavbarItem/DocsVersionNavbarItem'; diff --git a/packages/docusaurus-theme-classic/src/theme/NavbarItem/DropdownNavbarItem/Desktop/index.tsx b/packages/docusaurus-theme-classic/src/theme/NavbarItem/DropdownNavbarItem/Desktop/index.tsx index 4ecf04338998..cb8df1203943 100644 --- a/packages/docusaurus-theme-classic/src/theme/NavbarItem/DropdownNavbarItem/Desktop/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/NavbarItem/DropdownNavbarItem/Desktop/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {useState, useRef, useEffect, type ReactNode} from 'react'; +import {useState, useRef, useEffect, type ReactNode} from 'react'; import clsx from 'clsx'; import NavbarNavLink from '@theme/NavbarItem/NavbarNavLink'; import NavbarItem from '@theme/NavbarItem'; diff --git a/packages/docusaurus-theme-classic/src/theme/NavbarItem/DropdownNavbarItem/Mobile/index.tsx b/packages/docusaurus-theme-classic/src/theme/NavbarItem/DropdownNavbarItem/Mobile/index.tsx index d66d4d2891f7..0dd7edf32301 100644 --- a/packages/docusaurus-theme-classic/src/theme/NavbarItem/DropdownNavbarItem/Mobile/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/NavbarItem/DropdownNavbarItem/Mobile/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {useState, type ReactNode, type ComponentProps} from 'react'; +import {useState, type ReactNode, type ComponentProps} from 'react'; import clsx from 'clsx'; import { isRegexpStringMatch, diff --git a/packages/docusaurus-theme-classic/src/theme/NavbarItem/DropdownNavbarItem/index.tsx b/packages/docusaurus-theme-classic/src/theme/NavbarItem/DropdownNavbarItem/index.tsx index c1cd209a3862..d9e33e6d465c 100644 --- a/packages/docusaurus-theme-classic/src/theme/NavbarItem/DropdownNavbarItem/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/NavbarItem/DropdownNavbarItem/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import DropdownNavbarItemMobile from '@theme/NavbarItem/DropdownNavbarItem/Mobile'; import DropdownNavbarItemDesktop from '@theme/NavbarItem/DropdownNavbarItem/Desktop'; import type {Props} from '@theme/NavbarItem/DropdownNavbarItem'; diff --git a/packages/docusaurus-theme-classic/src/theme/NavbarItem/HtmlNavbarItem.tsx b/packages/docusaurus-theme-classic/src/theme/NavbarItem/HtmlNavbarItem.tsx index bbae87a59fea..d1b47036c908 100644 --- a/packages/docusaurus-theme-classic/src/theme/NavbarItem/HtmlNavbarItem.tsx +++ b/packages/docusaurus-theme-classic/src/theme/NavbarItem/HtmlNavbarItem.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import type {Props} from '@theme/NavbarItem/HtmlNavbarItem'; diff --git a/packages/docusaurus-theme-classic/src/theme/NavbarItem/LocaleDropdownNavbarItem/index.tsx b/packages/docusaurus-theme-classic/src/theme/NavbarItem/LocaleDropdownNavbarItem/index.tsx index 9c16b5387c00..e2a4ee24d978 100644 --- a/packages/docusaurus-theme-classic/src/theme/NavbarItem/LocaleDropdownNavbarItem/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/NavbarItem/LocaleDropdownNavbarItem/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import {useAlternatePageUtils} from '@docusaurus/theme-common/internal'; import {translate} from '@docusaurus/Translate'; diff --git a/packages/docusaurus-theme-classic/src/theme/NavbarItem/NavbarNavLink.tsx b/packages/docusaurus-theme-classic/src/theme/NavbarItem/NavbarNavLink.tsx index 52e198d33b81..18b81da2aef6 100644 --- a/packages/docusaurus-theme-classic/src/theme/NavbarItem/NavbarNavLink.tsx +++ b/packages/docusaurus-theme-classic/src/theme/NavbarItem/NavbarNavLink.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Link from '@docusaurus/Link'; import useBaseUrl from '@docusaurus/useBaseUrl'; import isInternalUrl from '@docusaurus/isInternalUrl'; diff --git a/packages/docusaurus-theme-classic/src/theme/NavbarItem/SearchNavbarItem.tsx b/packages/docusaurus-theme-classic/src/theme/NavbarItem/SearchNavbarItem.tsx index 78cf19df4a66..25d2f69b3e2b 100644 --- a/packages/docusaurus-theme-classic/src/theme/NavbarItem/SearchNavbarItem.tsx +++ b/packages/docusaurus-theme-classic/src/theme/NavbarItem/SearchNavbarItem.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import SearchBar from '@theme/SearchBar'; import NavbarSearch from '@theme/Navbar/Search'; import type {Props} from '@theme/NavbarItem/SearchNavbarItem'; diff --git a/packages/docusaurus-theme-classic/src/theme/NavbarItem/index.tsx b/packages/docusaurus-theme-classic/src/theme/NavbarItem/index.tsx index 5a90e7a9bcbf..d1ccf4ea479f 100644 --- a/packages/docusaurus-theme-classic/src/theme/NavbarItem/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/NavbarItem/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import ComponentTypes from '@theme/NavbarItem/ComponentTypes'; import type {NavbarItemType, Props} from '@theme/NavbarItem'; diff --git a/packages/docusaurus-theme-classic/src/theme/NotFound/Content/index.tsx b/packages/docusaurus-theme-classic/src/theme/NotFound/Content/index.tsx index e03e4a23deaf..6ed1cb4e2c36 100644 --- a/packages/docusaurus-theme-classic/src/theme/NotFound/Content/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/NotFound/Content/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import Translate from '@docusaurus/Translate'; import type {Props} from '@theme/NotFound/Content'; diff --git a/packages/docusaurus-theme-classic/src/theme/NotFound/index.tsx b/packages/docusaurus-theme-classic/src/theme/NotFound/index.tsx index 73d6e10a14cb..1a9a3629a12c 100644 --- a/packages/docusaurus-theme-classic/src/theme/NotFound/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/NotFound/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {translate} from '@docusaurus/Translate'; import {PageMetadata} from '@docusaurus/theme-common'; import Layout from '@theme/Layout'; diff --git a/packages/docusaurus-theme-classic/src/theme/PaginatorNavLink/index.tsx b/packages/docusaurus-theme-classic/src/theme/PaginatorNavLink/index.tsx index b13eaa3debf7..7f9213f9803d 100644 --- a/packages/docusaurus-theme-classic/src/theme/PaginatorNavLink/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/PaginatorNavLink/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import Link from '@docusaurus/Link'; import type {Props} from '@theme/PaginatorNavLink'; diff --git a/packages/docusaurus-theme-classic/src/theme/SearchMetadata/index.tsx b/packages/docusaurus-theme-classic/src/theme/SearchMetadata/index.tsx index 8d96c406b940..2ff45f82c38c 100644 --- a/packages/docusaurus-theme-classic/src/theme/SearchMetadata/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/SearchMetadata/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Head from '@docusaurus/Head'; import type {Props} from '@theme/SearchMetadata'; diff --git a/packages/docusaurus-theme-classic/src/theme/SiteMetadata/index.tsx b/packages/docusaurus-theme-classic/src/theme/SiteMetadata/index.tsx index d116f17af005..b4511d4fd13e 100644 --- a/packages/docusaurus-theme-classic/src/theme/SiteMetadata/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/SiteMetadata/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Head from '@docusaurus/Head'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import useBaseUrl from '@docusaurus/useBaseUrl'; diff --git a/packages/docusaurus-theme-classic/src/theme/SkipToContent/index.tsx b/packages/docusaurus-theme-classic/src/theme/SkipToContent/index.tsx index 2703a8ec36b3..ead62adff706 100644 --- a/packages/docusaurus-theme-classic/src/theme/SkipToContent/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/SkipToContent/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {SkipToContentLink} from '@docusaurus/theme-common'; import styles from './styles.module.css'; diff --git a/packages/docusaurus-theme-classic/src/theme/TOC/index.tsx b/packages/docusaurus-theme-classic/src/theme/TOC/index.tsx index f98c2bbbe751..088ded0fc561 100644 --- a/packages/docusaurus-theme-classic/src/theme/TOC/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/TOC/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import TOCItems from '@theme/TOCItems'; import type {Props} from '@theme/TOC'; diff --git a/packages/docusaurus-theme-classic/src/theme/TOCCollapsible/CollapseButton/index.tsx b/packages/docusaurus-theme-classic/src/theme/TOCCollapsible/CollapseButton/index.tsx index edeb917bcb87..83a89a9eab97 100644 --- a/packages/docusaurus-theme-classic/src/theme/TOCCollapsible/CollapseButton/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/TOCCollapsible/CollapseButton/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import Translate from '@docusaurus/Translate'; import type {Props} from '@theme/TOCCollapsible/CollapseButton'; diff --git a/packages/docusaurus-theme-classic/src/theme/TOCCollapsible/index.tsx b/packages/docusaurus-theme-classic/src/theme/TOCCollapsible/index.tsx index 6e3abcdd4e6c..05c495451b6d 100644 --- a/packages/docusaurus-theme-classic/src/theme/TOCCollapsible/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/TOCCollapsible/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {useCollapsible, Collapsible} from '@docusaurus/theme-common'; import TOCItems from '@theme/TOCItems'; diff --git a/packages/docusaurus-theme-classic/src/theme/TOCInline/index.tsx b/packages/docusaurus-theme-classic/src/theme/TOCInline/index.tsx index 3662405e2162..819f76e526dd 100644 --- a/packages/docusaurus-theme-classic/src/theme/TOCInline/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/TOCInline/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import TOCItems from '@theme/TOCItems'; import type {Props} from '@theme/TOCInline'; diff --git a/packages/docusaurus-theme-classic/src/theme/TOCItems/index.tsx b/packages/docusaurus-theme-classic/src/theme/TOCItems/index.tsx index 1f84ab3e66b3..a283d5fbee18 100644 --- a/packages/docusaurus-theme-classic/src/theme/TOCItems/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/TOCItems/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode, useMemo} from 'react'; +import {type ReactNode, useMemo} from 'react'; import {useThemeConfig} from '@docusaurus/theme-common'; import { useTOCHighlight, diff --git a/packages/docusaurus-theme-classic/src/theme/TabItem/index.tsx b/packages/docusaurus-theme-classic/src/theme/TabItem/index.tsx index 5037dc155b4f..2c2a45c30e85 100644 --- a/packages/docusaurus-theme-classic/src/theme/TabItem/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/TabItem/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {useTabs} from '@docusaurus/theme-common/internal'; import type {Props} from '@theme/TabItem'; diff --git a/packages/docusaurus-theme-classic/src/theme/Tabs/__tests__/index.test.tsx b/packages/docusaurus-theme-classic/src/theme/Tabs/__tests__/index.test.tsx index 7a07b714e612..def55a2a7a04 100644 --- a/packages/docusaurus-theme-classic/src/theme/Tabs/__tests__/index.test.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Tabs/__tests__/index.test.tsx @@ -6,7 +6,6 @@ */ // @vitest-environment jsdom import {describe, expect, it} from 'vitest'; -import React from 'react'; import type {PropsWithChildren, ReactNode} from 'react'; import {render} from '@testing-library/react'; import '@testing-library/jest-dom/vitest'; diff --git a/packages/docusaurus-theme-classic/src/theme/Tag/index.tsx b/packages/docusaurus-theme-classic/src/theme/Tag/index.tsx index 3011c5c8416d..f21c35f3d7fb 100644 --- a/packages/docusaurus-theme-classic/src/theme/Tag/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Tag/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import Link from '@docusaurus/Link'; import type {Props} from '@theme/Tag'; diff --git a/packages/docusaurus-theme-classic/src/theme/TagsListByLetter/index.tsx b/packages/docusaurus-theme-classic/src/theme/TagsListByLetter/index.tsx index 3caf55cdbc8b..53fa78a2ceb2 100644 --- a/packages/docusaurus-theme-classic/src/theme/TagsListByLetter/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/TagsListByLetter/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {listTagsByLetters, type TagLetterEntry} from '@docusaurus/theme-common'; import Tag from '@theme/Tag'; import type {Props} from '@theme/TagsListByLetter'; diff --git a/packages/docusaurus-theme-classic/src/theme/TagsListInline/index.tsx b/packages/docusaurus-theme-classic/src/theme/TagsListInline/index.tsx index 79fa3e77d4e9..3bc36af80913 100644 --- a/packages/docusaurus-theme-classic/src/theme/TagsListInline/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/TagsListInline/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import Translate from '@docusaurus/Translate'; import Tag from '@theme/Tag'; diff --git a/packages/docusaurus-theme-classic/src/theme/ThemeProvider/TitleFormatter/index.tsx b/packages/docusaurus-theme-classic/src/theme/ThemeProvider/TitleFormatter/index.tsx index 372d0e3f258f..7a1e904939d2 100644 --- a/packages/docusaurus-theme-classic/src/theme/ThemeProvider/TitleFormatter/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/ThemeProvider/TitleFormatter/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ComponentProps, type ReactNode} from 'react'; +import type {ComponentProps, ReactNode} from 'react'; import {TitleFormatterProvider} from '@docusaurus/theme-common/internal'; import type {Props} from '@theme/ThemeProvider/TitleFormatter'; diff --git a/packages/docusaurus-theme-classic/src/theme/ThemeProvider/index.tsx b/packages/docusaurus-theme-classic/src/theme/ThemeProvider/index.tsx index 61f7faad0ac3..9e6e48d1cfe9 100644 --- a/packages/docusaurus-theme-classic/src/theme/ThemeProvider/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/ThemeProvider/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import TitleFormatterProvider from '@theme/ThemeProvider/TitleFormatter'; import type {Props} from '@theme/ThemeProvider'; diff --git a/packages/docusaurus-theme-classic/src/theme/ThemedImage/index.tsx b/packages/docusaurus-theme-classic/src/theme/ThemedImage/index.tsx index 32a75f188053..bae945e772fb 100644 --- a/packages/docusaurus-theme-classic/src/theme/ThemedImage/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/ThemedImage/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {ThemedComponent} from '@docusaurus/theme-common'; import type {Props} from '@theme/ThemedImage'; diff --git a/packages/docusaurus-theme-common/src/components/Details/__tests__/index.test.tsx b/packages/docusaurus-theme-common/src/components/Details/__tests__/index.test.tsx index 18dd2d150b4d..f02f8b8bef59 100644 --- a/packages/docusaurus-theme-common/src/components/Details/__tests__/index.test.tsx +++ b/packages/docusaurus-theme-common/src/components/Details/__tests__/index.test.tsx @@ -6,7 +6,6 @@ */ // @vitest-environment jsdom import {describe, expect, it, vi} from 'vitest'; -import React from 'react'; import {render, act, fireEvent} from '@testing-library/react'; import {Details} from '../index'; diff --git a/packages/docusaurus-theme-common/src/translations/blogTranslations.tsx b/packages/docusaurus-theme-common/src/translations/blogTranslations.tsx index a9e1328059c3..c4c644c99e45 100644 --- a/packages/docusaurus-theme-common/src/translations/blogTranslations.tsx +++ b/packages/docusaurus-theme-common/src/translations/blogTranslations.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Translate, {translate} from '@docusaurus/Translate'; import {usePluralForm} from '../utils/usePluralForm'; diff --git a/packages/docusaurus-theme-common/src/translations/contentVisibilityTranslations.tsx b/packages/docusaurus-theme-common/src/translations/contentVisibilityTranslations.tsx index 703473640b12..da170f65e560 100644 --- a/packages/docusaurus-theme-common/src/translations/contentVisibilityTranslations.tsx +++ b/packages/docusaurus-theme-common/src/translations/contentVisibilityTranslations.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Translate from '@docusaurus/Translate'; export function UnlistedBannerTitle(): ReactNode { diff --git a/packages/docusaurus-theme-common/src/utils/__tests__/useAlternatePageUtils.test.tsx b/packages/docusaurus-theme-common/src/utils/__tests__/useAlternatePageUtils.test.tsx index bf9245112a32..79e73d6400f7 100644 --- a/packages/docusaurus-theme-common/src/utils/__tests__/useAlternatePageUtils.test.tsx +++ b/packages/docusaurus-theme-common/src/utils/__tests__/useAlternatePageUtils.test.tsx @@ -6,7 +6,6 @@ */ // @vitest-environment jsdom import {describe, expect, it} from 'vitest'; -import React from 'react'; import {renderHook} from '@testing-library/react'; import {StaticRouter} from 'react-router-dom'; import {Context} from '@docusaurus/core/src/client/docusaurusContext'; diff --git a/packages/docusaurus-theme-common/src/utils/__tests__/useLocalPathname.test.tsx b/packages/docusaurus-theme-common/src/utils/__tests__/useLocalPathname.test.tsx index 45d7c633e35e..a74f9783db60 100644 --- a/packages/docusaurus-theme-common/src/utils/__tests__/useLocalPathname.test.tsx +++ b/packages/docusaurus-theme-common/src/utils/__tests__/useLocalPathname.test.tsx @@ -6,7 +6,6 @@ */ // @vitest-environment jsdom import {describe, expect, it} from 'vitest'; -import React from 'react'; import {renderHook} from '@testing-library/react'; import {StaticRouter} from 'react-router-dom'; import {Context} from '@docusaurus/core/src/client/docusaurusContext'; diff --git a/packages/docusaurus-theme-common/src/utils/__tests__/usePluralForm.test.tsx b/packages/docusaurus-theme-common/src/utils/__tests__/usePluralForm.test.tsx index 1254fc5ef955..ff66a5218b16 100644 --- a/packages/docusaurus-theme-common/src/utils/__tests__/usePluralForm.test.tsx +++ b/packages/docusaurus-theme-common/src/utils/__tests__/usePluralForm.test.tsx @@ -6,7 +6,6 @@ */ // @vitest-environment jsdom import {describe, expect, it, vi} from 'vitest'; -import React from 'react'; import {renderHook} from '@testing-library/react'; import {Context} from '@docusaurus/core/src/client/docusaurusContext'; import {usePluralForm} from '../usePluralForm'; diff --git a/packages/docusaurus-theme-common/src/utils/navbarUtils.tsx b/packages/docusaurus-theme-common/src/utils/navbarUtils.tsx index ba95147fffb0..0ae8a16798c6 100644 --- a/packages/docusaurus-theme-common/src/utils/navbarUtils.tsx +++ b/packages/docusaurus-theme-common/src/utils/navbarUtils.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {NavbarMobileSidebarProvider} from '../contexts/navbarMobileSidebar'; import {NavbarSecondaryMenuContentProvider} from '../contexts/navbarSecondaryMenu/content'; import {NavbarSecondaryMenuDisplayProvider} from '../contexts/navbarSecondaryMenu/display'; diff --git a/packages/docusaurus-theme-common/src/utils/reactUtils.tsx b/packages/docusaurus-theme-common/src/utils/reactUtils.tsx index d45c158b6945..a806088dcb16 100644 --- a/packages/docusaurus-theme-common/src/utils/reactUtils.tsx +++ b/packages/docusaurus-theme-common/src/utils/reactUtils.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, { +import { useCallback, useLayoutEffect, useMemo, diff --git a/packages/docusaurus-theme-live-codeblock/src/theme/CodeBlock/index.tsx b/packages/docusaurus-theme-live-codeblock/src/theme/CodeBlock/index.tsx index 00d1a22adad2..c350132d4e6d 100644 --- a/packages/docusaurus-theme-live-codeblock/src/theme/CodeBlock/index.tsx +++ b/packages/docusaurus-theme-live-codeblock/src/theme/CodeBlock/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import type {Props as CodeBlockProps} from '@theme/CodeBlock'; import OriginalCodeBlock from '@theme-init/CodeBlock'; import LiveCodeBlock from '@theme/LiveCodeBlock'; diff --git a/packages/docusaurus-theme-live-codeblock/src/theme/LiveCodeBlock/index.tsx b/packages/docusaurus-theme-live-codeblock/src/theme/LiveCodeBlock/index.tsx index 5beb7ca27740..01faef81089e 100644 --- a/packages/docusaurus-theme-live-codeblock/src/theme/LiveCodeBlock/index.tsx +++ b/packages/docusaurus-theme-live-codeblock/src/theme/LiveCodeBlock/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Playground from '@theme/Playground'; import ReactLiveScope from '@theme/ReactLiveScope'; import type {Props} from '@theme/LiveCodeBlock'; diff --git a/packages/docusaurus-theme-live-codeblock/src/theme/Playground/Container/index.tsx b/packages/docusaurus-theme-live-codeblock/src/theme/Playground/Container/index.tsx index 4dd77725bbe4..0191eb5d6abd 100644 --- a/packages/docusaurus-theme-live-codeblock/src/theme/Playground/Container/index.tsx +++ b/packages/docusaurus-theme-live-codeblock/src/theme/Playground/Container/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import type {Props} from '@theme/Playground/Container'; diff --git a/packages/docusaurus-theme-live-codeblock/src/theme/Playground/Editor/index.tsx b/packages/docusaurus-theme-live-codeblock/src/theme/Playground/Editor/index.tsx index 03ba4e1176a1..e59e0cbd1bf5 100644 --- a/packages/docusaurus-theme-live-codeblock/src/theme/Playground/Editor/index.tsx +++ b/packages/docusaurus-theme-live-codeblock/src/theme/Playground/Editor/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {LiveEditor} from 'react-live'; import useIsBrowser from '@docusaurus/useIsBrowser'; import Translate from '@docusaurus/Translate'; diff --git a/packages/docusaurus-theme-live-codeblock/src/theme/Playground/Header/index.tsx b/packages/docusaurus-theme-live-codeblock/src/theme/Playground/Header/index.tsx index 32d748cd97a0..3f98f41ff614 100644 --- a/packages/docusaurus-theme-live-codeblock/src/theme/Playground/Header/index.tsx +++ b/packages/docusaurus-theme-live-codeblock/src/theme/Playground/Header/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import type {Props} from '@theme/Playground/Header'; diff --git a/packages/docusaurus-theme-live-codeblock/src/theme/Playground/Layout/index.tsx b/packages/docusaurus-theme-live-codeblock/src/theme/Playground/Layout/index.tsx index 9799f45e3fe9..157b7993e887 100644 --- a/packages/docusaurus-theme-live-codeblock/src/theme/Playground/Layout/index.tsx +++ b/packages/docusaurus-theme-live-codeblock/src/theme/Playground/Layout/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {useThemeConfig} from '@docusaurus/theme-common'; import PlaygroundPreview from '@theme/Playground/Preview'; import PlaygroundEditor from '@theme/Playground/Editor'; diff --git a/packages/docusaurus-theme-live-codeblock/src/theme/Playground/Preview/index.tsx b/packages/docusaurus-theme-live-codeblock/src/theme/Playground/Preview/index.tsx index b4f6e1ef887e..67281fccbc3b 100644 --- a/packages/docusaurus-theme-live-codeblock/src/theme/Playground/Preview/index.tsx +++ b/packages/docusaurus-theme-live-codeblock/src/theme/Playground/Preview/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {LiveError, LivePreview} from 'react-live'; import BrowserOnly from '@docusaurus/BrowserOnly'; import {ErrorBoundaryErrorMessageFallback} from '@docusaurus/theme-common'; diff --git a/packages/docusaurus-theme-live-codeblock/src/theme/Playground/Provider/index.tsx b/packages/docusaurus-theme-live-codeblock/src/theme/Playground/Provider/index.tsx index 7bc37c3308c2..94be6959cc07 100644 --- a/packages/docusaurus-theme-live-codeblock/src/theme/Playground/Provider/index.tsx +++ b/packages/docusaurus-theme-live-codeblock/src/theme/Playground/Provider/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode, useCallback, useMemo, useState} from 'react'; +import {type ReactNode, useCallback, useMemo, useState} from 'react'; import {LiveProvider} from 'react-live'; import {PlaygroundProvider as PlaygroundProviderComponent} from '@docusaurus/theme-live-codeblock/client'; import {usePrismTheme} from '@docusaurus/theme-common'; diff --git a/packages/docusaurus-theme-live-codeblock/src/theme/Playground/index.tsx b/packages/docusaurus-theme-live-codeblock/src/theme/Playground/index.tsx index c7cdc8824c32..02ee51deefeb 100644 --- a/packages/docusaurus-theme-live-codeblock/src/theme/Playground/index.tsx +++ b/packages/docusaurus-theme-live-codeblock/src/theme/Playground/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import PlaygroundProvider from '@theme/Playground/Provider'; import PlaygroundContainer from '@theme/Playground/Container'; import PlaygroundLayout from '@theme/Playground/Layout'; diff --git a/packages/docusaurus-theme-mermaid/src/theme/Mermaid/index.tsx b/packages/docusaurus-theme-mermaid/src/theme/Mermaid/index.tsx index 21fb67063cef..de536178d62a 100644 --- a/packages/docusaurus-theme-mermaid/src/theme/Mermaid/index.tsx +++ b/packages/docusaurus-theme-mermaid/src/theme/Mermaid/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {useEffect, useRef, type ReactNode} from 'react'; +import {useEffect, useRef, type ReactNode} from 'react'; import ErrorBoundary from '@docusaurus/ErrorBoundary'; import {ErrorBoundaryErrorMessageFallback} from '@docusaurus/theme-common'; import { diff --git a/packages/docusaurus-theme-search-algolia/src/theme/SearchBar/index.tsx b/packages/docusaurus-theme-search-algolia/src/theme/SearchBar/index.tsx index 538d18778c44..6b46c11930ad 100644 --- a/packages/docusaurus-theme-search-algolia/src/theme/SearchBar/index.tsx +++ b/packages/docusaurus-theme-search-algolia/src/theme/SearchBar/index.tsx @@ -5,13 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, { - useCallback, - useMemo, - useRef, - useState, - type ReactNode, -} from 'react'; +import {useCallback, useMemo, useRef, useState, type ReactNode} from 'react'; import {createPortal} from 'react-dom'; import {DocSearchButton} from '@docsearch/react/button'; import {useDocSearchKeyboardEvents} from '@docsearch/react/useDocSearchKeyboardEvents'; diff --git a/packages/docusaurus-theme-search-algolia/src/theme/SearchPage/index.tsx b/packages/docusaurus-theme-search-algolia/src/theme/SearchPage/index.tsx index a16f8e552d90..103a6b9206d8 100644 --- a/packages/docusaurus-theme-search-algolia/src/theme/SearchPage/index.tsx +++ b/packages/docusaurus-theme-search-algolia/src/theme/SearchPage/index.tsx @@ -7,13 +7,7 @@ /* eslint-disable jsx-a11y/no-autofocus */ -import React, { - type ReactNode, - useEffect, - useReducer, - useRef, - useState, -} from 'react'; +import {type ReactNode, useEffect, useReducer, useRef, useState} from 'react'; import clsx from 'clsx'; import algoliaSearchHelper from 'algoliasearch-helper'; diff --git a/packages/docusaurus-tsconfig/tsconfig.json b/packages/docusaurus-tsconfig/tsconfig.json index e2c9cf51e1c4..2ce97fafca33 100644 --- a/packages/docusaurus-tsconfig/tsconfig.json +++ b/packages/docusaurus-tsconfig/tsconfig.json @@ -6,6 +6,7 @@ "allowJs": true, "esModuleInterop": true, "jsx": "preserve", + "jsxImportSource": "react", "target": "ES2022", "lib": ["ES2022", "DOM"], "moduleResolution": "bundler", diff --git a/packages/docusaurus/src/client/App.tsx b/packages/docusaurus/src/client/App.tsx index f616b668f869..f9748a86f9cd 100644 --- a/packages/docusaurus/src/client/App.tsx +++ b/packages/docusaurus/src/client/App.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import '@generated/client-modules'; import routes from '@generated/routes'; diff --git a/packages/docusaurus/src/client/BaseUrlIssueBanner/index.tsx b/packages/docusaurus/src/client/BaseUrlIssueBanner/index.tsx index 326872fb2738..08108957389d 100644 --- a/packages/docusaurus/src/client/BaseUrlIssueBanner/index.tsx +++ b/packages/docusaurus/src/client/BaseUrlIssueBanner/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {useLocation} from '@docusaurus/router'; import Head from '@docusaurus/Head'; import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment'; diff --git a/packages/docusaurus/src/client/SiteMetadataDefaults.tsx b/packages/docusaurus/src/client/SiteMetadataDefaults.tsx index 6ac5543ae949..bf89ea6e6a39 100644 --- a/packages/docusaurus/src/client/SiteMetadataDefaults.tsx +++ b/packages/docusaurus/src/client/SiteMetadataDefaults.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Head from '@docusaurus/Head'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import useBaseUrl from '@docusaurus/useBaseUrl'; diff --git a/packages/docusaurus/src/client/__tests__/docusaurusContext.test.tsx b/packages/docusaurus/src/client/__tests__/docusaurusContext.test.tsx index 6e83e3df33dc..a5cb511fcf81 100644 --- a/packages/docusaurus/src/client/__tests__/docusaurusContext.test.tsx +++ b/packages/docusaurus/src/client/__tests__/docusaurusContext.test.tsx @@ -6,7 +6,6 @@ */ // @vitest-environment jsdom import {describe, expect, it} from 'vitest'; -import React from 'react'; import {renderHook} from '@testing-library/react'; import {DocusaurusContextProvider} from '../docusaurusContext'; import useDocusaurusContext from '../exports/useDocusaurusContext'; diff --git a/packages/docusaurus/src/client/__tests__/routeContext.test.tsx b/packages/docusaurus/src/client/__tests__/routeContext.test.tsx index a82c95db8429..7c888379c4d8 100644 --- a/packages/docusaurus/src/client/__tests__/routeContext.test.tsx +++ b/packages/docusaurus/src/client/__tests__/routeContext.test.tsx @@ -6,7 +6,6 @@ */ // @vitest-environment jsdom import {describe, expect, it} from 'vitest'; -import React from 'react'; import {renderHook} from '@testing-library/react'; import {RouteContextProvider} from '../routeContext'; import useRouteContext from '../exports/useRouteContext'; diff --git a/packages/docusaurus/src/client/clientEntry.tsx b/packages/docusaurus/src/client/clientEntry.tsx index db521bb39f50..cce23f98a6e6 100644 --- a/packages/docusaurus/src/client/clientEntry.tsx +++ b/packages/docusaurus/src/client/clientEntry.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {startTransition, type ReactNode} from 'react'; +import {startTransition, type ReactNode} from 'react'; import ReactDOM, {type ErrorInfo} from 'react-dom/client'; import {HelmetProvider} from 'react-helmet-async'; import {BrowserRouter, HashRouter} from 'react-router-dom'; diff --git a/packages/docusaurus/src/client/exports/BrowserOnly.tsx b/packages/docusaurus/src/client/exports/BrowserOnly.tsx index 4a0904ac930b..ffde2da42581 100644 --- a/packages/docusaurus/src/client/exports/BrowserOnly.tsx +++ b/packages/docusaurus/src/client/exports/BrowserOnly.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {Suspense, isValidElement, use, type ReactNode} from 'react'; +import {Suspense, isValidElement, use, type ReactNode} from 'react'; import {browser} from 'react-dom'; import type {Props} from '@docusaurus/BrowserOnly'; diff --git a/packages/docusaurus/src/client/exports/Head.tsx b/packages/docusaurus/src/client/exports/Head.tsx index 6731355fd4a7..563744b7ae2d 100644 --- a/packages/docusaurus/src/client/exports/Head.tsx +++ b/packages/docusaurus/src/client/exports/Head.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {Helmet} from 'react-helmet-async'; import type {Props} from '@docusaurus/Head'; diff --git a/packages/docusaurus/src/client/exports/Link.tsx b/packages/docusaurus/src/client/exports/Link.tsx index 7352508c14dc..e53f3b186da0 100644 --- a/packages/docusaurus/src/client/exports/Link.tsx +++ b/packages/docusaurus/src/client/exports/Link.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, { +import { useCallback, useEffect, useImperativeHandle, diff --git a/packages/docusaurus/src/client/exports/Translate.tsx b/packages/docusaurus/src/client/exports/Translate.tsx index d782f365788d..fe21a4673b53 100644 --- a/packages/docusaurus/src/client/exports/Translate.tsx +++ b/packages/docusaurus/src/client/exports/Translate.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {interpolate, type InterpolateValues} from '@docusaurus/Interpolate'; // Can't read it from context, due to exposing imperative API import codeTranslations from '@generated/codeTranslations'; diff --git a/packages/docusaurus/src/client/exports/__tests__/Head.test.tsx b/packages/docusaurus/src/client/exports/__tests__/Head.test.tsx index ef90eb67ec0e..f54a59e5f68e 100644 --- a/packages/docusaurus/src/client/exports/__tests__/Head.test.tsx +++ b/packages/docusaurus/src/client/exports/__tests__/Head.test.tsx @@ -6,7 +6,6 @@ */ // @vitest-environment jsdom import {describe, expect, it} from 'vitest'; -import React from 'react'; import {render} from '@testing-library/react'; import '@testing-library/jest-dom/vitest'; import {HelmetProvider} from 'react-helmet-async'; diff --git a/packages/docusaurus/src/client/exports/__tests__/Interpolate.test.tsx b/packages/docusaurus/src/client/exports/__tests__/Interpolate.test.tsx index 419a401d9da1..63538d9efaff 100644 --- a/packages/docusaurus/src/client/exports/__tests__/Interpolate.test.tsx +++ b/packages/docusaurus/src/client/exports/__tests__/Interpolate.test.tsx @@ -6,7 +6,6 @@ */ // @vitest-environment jsdom import {describe, expect, it} from 'vitest'; -import React from 'react'; import {render} from '@testing-library/react'; import '@testing-library/jest-dom/vitest'; import Interpolate, {interpolate} from '../Interpolate'; diff --git a/packages/docusaurus/src/client/exports/__tests__/Link.test.tsx b/packages/docusaurus/src/client/exports/__tests__/Link.test.tsx index ba302fdf495f..95d631810662 100644 --- a/packages/docusaurus/src/client/exports/__tests__/Link.test.tsx +++ b/packages/docusaurus/src/client/exports/__tests__/Link.test.tsx @@ -7,7 +7,7 @@ // @vitest-environment jsdom import {describe, expect, it, vi} from 'vitest'; -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {render as renderRTL} from '@testing-library/react'; import '@testing-library/jest-dom/vitest'; import {fromPartial} from '@total-typescript/shoehorn'; diff --git a/packages/docusaurus/src/client/exports/__tests__/Translate.test.tsx b/packages/docusaurus/src/client/exports/__tests__/Translate.test.tsx index 87683f0441ba..bfb78b6b6db2 100644 --- a/packages/docusaurus/src/client/exports/__tests__/Translate.test.tsx +++ b/packages/docusaurus/src/client/exports/__tests__/Translate.test.tsx @@ -6,7 +6,6 @@ */ // @vitest-environment jsdom import {describe, expect, it} from 'vitest'; -import React from 'react'; import {render} from '@testing-library/react'; import '@testing-library/jest-dom/vitest'; diff --git a/packages/docusaurus/src/client/exports/__tests__/useBaseUrl.test.tsx b/packages/docusaurus/src/client/exports/__tests__/useBaseUrl.test.tsx index 92fc03531e19..219a3a179e4c 100644 --- a/packages/docusaurus/src/client/exports/__tests__/useBaseUrl.test.tsx +++ b/packages/docusaurus/src/client/exports/__tests__/useBaseUrl.test.tsx @@ -6,7 +6,6 @@ */ // @vitest-environment jsdom import {describe, expect, it} from 'vitest'; -import React from 'react'; import {renderHook} from '@testing-library/react'; import {fromPartial} from '@total-typescript/shoehorn'; import useBaseUrl, {addBaseUrl, useBaseUrlUtils} from '../useBaseUrl'; diff --git a/packages/docusaurus/src/client/exports/__tests__/useGlobalData.test.tsx b/packages/docusaurus/src/client/exports/__tests__/useGlobalData.test.tsx index 7b9d5376607b..8d4ce33c8b9c 100644 --- a/packages/docusaurus/src/client/exports/__tests__/useGlobalData.test.tsx +++ b/packages/docusaurus/src/client/exports/__tests__/useGlobalData.test.tsx @@ -6,7 +6,6 @@ */ // @vitest-environment jsdom import {describe, expect, it} from 'vitest'; -import React from 'react'; import {renderHook} from '@testing-library/react'; import useGlobalData, { useAllPluginInstancesData, diff --git a/packages/docusaurus/src/client/exports/__tests__/useIsBrowser.test.tsx b/packages/docusaurus/src/client/exports/__tests__/useIsBrowser.test.tsx index 6b4f5041c005..03080977bf43 100644 --- a/packages/docusaurus/src/client/exports/__tests__/useIsBrowser.test.tsx +++ b/packages/docusaurus/src/client/exports/__tests__/useIsBrowser.test.tsx @@ -6,7 +6,7 @@ */ // @vitest-environment jsdom import {describe, expect, it} from 'vitest'; -import React, {act} from 'react'; +import {act} from 'react'; import {renderToString} from 'react-dom/server'; import {hydrateRoot} from 'react-dom/client'; import {renderHook} from '@testing-library/react'; diff --git a/packages/docusaurus/src/client/exports/__tests__/useRouteContext.test.tsx b/packages/docusaurus/src/client/exports/__tests__/useRouteContext.test.tsx index bbceef093d61..cf561da12189 100644 --- a/packages/docusaurus/src/client/exports/__tests__/useRouteContext.test.tsx +++ b/packages/docusaurus/src/client/exports/__tests__/useRouteContext.test.tsx @@ -6,7 +6,6 @@ */ // @vitest-environment jsdom import {describe, expect, it} from 'vitest'; -import React from 'react'; import {renderHook} from '@testing-library/react'; import {RouteContextProvider} from '../../routeContext'; import useRouteContext from '../useRouteContext'; diff --git a/packages/docusaurus/src/client/hasHydratedDataAttribute.tsx b/packages/docusaurus/src/client/hasHydratedDataAttribute.tsx index 44e967f2d54b..8e43f8a9edb6 100644 --- a/packages/docusaurus/src/client/hasHydratedDataAttribute.tsx +++ b/packages/docusaurus/src/client/hasHydratedDataAttribute.tsx @@ -6,7 +6,6 @@ */ import type {ReactNode} from 'react'; -import React from 'react'; import Head from '@docusaurus/Head'; import useIsBrowser from '@docusaurus/useIsBrowser'; diff --git a/packages/docusaurus/src/client/serverEntry.tsx b/packages/docusaurus/src/client/serverEntry.tsx index 1ca10a1d3826..d0c1198071a7 100644 --- a/packages/docusaurus/src/client/serverEntry.tsx +++ b/packages/docusaurus/src/client/serverEntry.tsx @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -import React from 'react'; import {StaticRouter} from 'react-router-dom'; import {HelmetProvider, type FilledContext} from 'react-helmet-async'; import Loadable from 'react-loadable'; diff --git a/packages/docusaurus/src/client/theme-fallback/Error/index.tsx b/packages/docusaurus/src/client/theme-fallback/Error/index.tsx index 4ba3419a37fb..d898b78595b3 100644 --- a/packages/docusaurus/src/client/theme-fallback/Error/index.tsx +++ b/packages/docusaurus/src/client/theme-fallback/Error/index.tsx @@ -8,7 +8,7 @@ // Should we translate theme-fallback? /* eslint-disable @docusaurus/no-untranslated-text */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Head from '@docusaurus/Head'; import ErrorBoundary from '@docusaurus/ErrorBoundary'; import {getErrorCausalChain} from '@docusaurus/utils-common'; diff --git a/packages/docusaurus/src/client/theme-fallback/Layout/index.tsx b/packages/docusaurus/src/client/theme-fallback/Layout/index.tsx index ddfb291479e1..9e62535a60e9 100644 --- a/packages/docusaurus/src/client/theme-fallback/Layout/index.tsx +++ b/packages/docusaurus/src/client/theme-fallback/Layout/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import type {Props} from '@theme/Layout'; export default function Layout({children}: Props): ReactNode { diff --git a/packages/docusaurus/src/client/theme-fallback/Loading/index.tsx b/packages/docusaurus/src/client/theme-fallback/Loading/index.tsx index 339c539efed6..82d57dae00a3 100644 --- a/packages/docusaurus/src/client/theme-fallback/Loading/index.tsx +++ b/packages/docusaurus/src/client/theme-fallback/Loading/index.tsx @@ -8,7 +8,7 @@ // Should we translate theme-fallback? /* eslint-disable @docusaurus/no-untranslated-text */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import type {LoadingComponentProps} from 'react-loadable'; export default function Loading({ diff --git a/packages/docusaurus/src/client/theme-fallback/NotFound/index.tsx b/packages/docusaurus/src/client/theme-fallback/NotFound/index.tsx index 2ca683bbd567..d5f1c5532d15 100644 --- a/packages/docusaurus/src/client/theme-fallback/NotFound/index.tsx +++ b/packages/docusaurus/src/client/theme-fallback/NotFound/index.tsx @@ -8,7 +8,7 @@ // Should we translate theme-fallback? /* eslint-disable @docusaurus/no-untranslated-text */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Head from '@docusaurus/Head'; import Layout from '@theme/Layout'; diff --git a/packages/docusaurus/src/client/theme-fallback/Root/index.tsx b/packages/docusaurus/src/client/theme-fallback/Root/index.tsx index 78eb39abf9ab..61045ccc1f54 100644 --- a/packages/docusaurus/src/client/theme-fallback/Root/index.tsx +++ b/packages/docusaurus/src/client/theme-fallback/Root/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import type {Props} from '@theme/Root'; // Wrapper at the very top of the app, that is applied constantly diff --git a/packages/docusaurus/src/client/theme-fallback/ThemeProvider/index.tsx b/packages/docusaurus/src/client/theme-fallback/ThemeProvider/index.tsx index b1f152254995..de7b3b3f4707 100644 --- a/packages/docusaurus/src/client/theme-fallback/ThemeProvider/index.tsx +++ b/packages/docusaurus/src/client/theme-fallback/ThemeProvider/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import type {Props} from '@theme/ThemeProvider'; // Wrapper component expected to be implemented by a theme diff --git a/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/ComponentInFolder/ComponentInSubFolder/index.tsx b/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/ComponentInFolder/ComponentInSubFolder/index.tsx index 6a88f9c00b09..ceaf4c362c1a 100644 --- a/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/ComponentInFolder/ComponentInSubFolder/index.tsx +++ b/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/ComponentInFolder/ComponentInSubFolder/index.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - export default function ComponentInSubFolder() { return
ComponentInSubFolder
; } diff --git a/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/ComponentInFolder/Sibling.tsx b/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/ComponentInFolder/Sibling.tsx index ce1ea507e93f..31fb97d80b2f 100644 --- a/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/ComponentInFolder/Sibling.tsx +++ b/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/ComponentInFolder/Sibling.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - export default function Sibling() { return
Sibling
; } diff --git a/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/ComponentInFolder/index.tsx b/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/ComponentInFolder/index.tsx index dc1a164502f2..0f76ef08074e 100644 --- a/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/ComponentInFolder/index.tsx +++ b/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/ComponentInFolder/index.tsx @@ -5,8 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -import React from 'react'; - export default function ComponentInFolder() { return
ComponentInFolder
; } diff --git a/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/FirstLevelComponent.tsx b/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/FirstLevelComponent.tsx index 3cde34503d66..566470e0f853 100644 --- a/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/FirstLevelComponent.tsx +++ b/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/FirstLevelComponent.tsx @@ -5,8 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -import React from 'react'; - export default function FirstLevelComponent() { return
First level component
; } diff --git a/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/JsComponent/index.js b/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/JsComponent/index.js index dcf3086a302e..b796558b5a27 100644 --- a/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/JsComponent/index.js +++ b/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/JsComponent/index.js @@ -1,5 +1,3 @@ -import React from 'react'; - export default function NoIndexComp1() { return
NoIndexComp1
; } diff --git a/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/NoIndex/NoIndexComp1.tsx b/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/NoIndex/NoIndexComp1.tsx index dcf3086a302e..b796558b5a27 100644 --- a/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/NoIndex/NoIndexComp1.tsx +++ b/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/NoIndex/NoIndexComp1.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - export default function NoIndexComp1() { return
NoIndexComp1
; } diff --git a/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/NoIndex/NoIndexComp2.tsx b/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/NoIndex/NoIndexComp2.tsx index f070a38c0341..89f5db6080d8 100644 --- a/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/NoIndex/NoIndexComp2.tsx +++ b/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/NoIndex/NoIndexComp2.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - export default function NoIndexComp2() { return
NoIndexComp2
; } diff --git a/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/NoIndex/NoIndexSub/NoIndexSubComp.tsx b/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/NoIndex/NoIndexSub/NoIndexSubComp.tsx index fdb3570a32fc..7024a029b161 100644 --- a/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/NoIndex/NoIndexSub/NoIndexSubComp.tsx +++ b/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/NoIndex/NoIndexSub/NoIndexSubComp.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - export default function NoIndexSubComp() { return
NoIndexSubComp
; } diff --git a/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/__fixtures__/ComponentInFixturesFolder.tsx b/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/__fixtures__/ComponentInFixturesFolder.tsx index eefcdefa686f..569fded0aa25 100644 --- a/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/__fixtures__/ComponentInFixturesFolder.tsx +++ b/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/__fixtures__/ComponentInFixturesFolder.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - export default function ComponentInFixturesFolder() { return
ComponentInFixturesFolder
; } diff --git a/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/__mocks__/ComponentInMocksFolder.tsx b/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/__mocks__/ComponentInMocksFolder.tsx index c6c68e51cb5e..08cc3a5a29b5 100644 --- a/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/__mocks__/ComponentInMocksFolder.tsx +++ b/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/__mocks__/ComponentInMocksFolder.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - export default function ComponentInMocksFolder() { return
ComponentInMocksFolder
; } diff --git a/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/__tests__/ComponentInTestFolder.tsx b/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/__tests__/ComponentInTestFolder.tsx index bbc1f2c47be2..e82115aa903b 100644 --- a/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/__tests__/ComponentInTestFolder.tsx +++ b/packages/docusaurus/src/commands/swizzle/__tests__/__fixtures__/theme/__tests__/ComponentInTestFolder.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - export default function ComponentInTestFolder() { return
ComponentInTestFolder
; } diff --git a/packages/docusaurus/src/commands/swizzle/__tests__/__snapshots__/actions.test.ts.snap b/packages/docusaurus/src/commands/swizzle/__tests__/__snapshots__/actions.test.ts.snap index 19a57fc35a64..184786c27f13 100644 --- a/packages/docusaurus/src/commands/swizzle/__tests__/__snapshots__/actions.test.ts.snap +++ b/packages/docusaurus/src/commands/swizzle/__tests__/__snapshots__/actions.test.ts.snap @@ -1,8 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`wrap > JavaScript > wrap ComponentInFolder 2`] = ` -"import React from 'react'; -import ComponentInFolder from '@theme-original/ComponentInFolder'; +"import ComponentInFolder from '@theme-original/ComponentInFolder'; export default function ComponentInFolderWrapper(props) { return ( @@ -15,8 +14,7 @@ export default function ComponentInFolderWrapper(props) { `; exports[`wrap > JavaScript > wrap ComponentInFolder/ComponentInSubFolder 2`] = ` -"import React from 'react'; -import ComponentInSubFolder from '@theme-original/ComponentInFolder/ComponentInSubFolder'; +"import ComponentInSubFolder from '@theme-original/ComponentInFolder/ComponentInSubFolder'; export default function ComponentInSubFolderWrapper(props) { return ( @@ -29,8 +27,7 @@ export default function ComponentInSubFolderWrapper(props) { `; exports[`wrap > JavaScript > wrap FirstLevelComponent 2`] = ` -"import React from 'react'; -import FirstLevelComponent from '@theme-original/FirstLevelComponent'; +"import FirstLevelComponent from '@theme-original/FirstLevelComponent'; export default function FirstLevelComponentWrapper(props) { return ( @@ -43,7 +40,7 @@ export default function FirstLevelComponentWrapper(props) { `; exports[`wrap > TypeScript > wrap ComponentInFolder 2`] = ` -"import React, {type ReactNode} from 'react'; +"import type {ReactNode} from 'react'; import ComponentInFolder from '@theme-original/ComponentInFolder'; import type ComponentInFolderType from '@theme/ComponentInFolder'; import type {WrapperProps} from '@docusaurus/types'; @@ -61,7 +58,7 @@ export default function ComponentInFolderWrapper(props: Props): ReactNode { `; exports[`wrap > TypeScript > wrap ComponentInFolder/ComponentInSubFolder 2`] = ` -"import React, {type ReactNode} from 'react'; +"import type {ReactNode} from 'react'; import ComponentInSubFolder from '@theme-original/ComponentInFolder/ComponentInSubFolder'; import type ComponentInSubFolderType from '@theme/ComponentInFolder/ComponentInSubFolder'; import type {WrapperProps} from '@docusaurus/types'; @@ -79,7 +76,7 @@ export default function ComponentInSubFolderWrapper(props: Props): ReactNode { `; exports[`wrap > TypeScript > wrap FirstLevelComponent 2`] = ` -"import React, {type ReactNode} from 'react'; +"import type {ReactNode} from 'react'; import FirstLevelComponent from '@theme-original/FirstLevelComponent'; import type FirstLevelComponentType from '@theme/FirstLevelComponent'; import type {WrapperProps} from '@docusaurus/types'; diff --git a/packages/docusaurus/src/commands/swizzle/__tests__/__snapshots__/index.test.ts.snap b/packages/docusaurus/src/commands/swizzle/__tests__/__snapshots__/index.test.ts.snap index 6fdc9e0879f6..eb599579dba2 100644 --- a/packages/docusaurus/src/commands/swizzle/__tests__/__snapshots__/index.test.ts.snap +++ b/packages/docusaurus/src/commands/swizzle/__tests__/__snapshots__/index.test.ts.snap @@ -54,9 +54,7 @@ exports[`swizzle eject > ComponentInFolder TS > ComponentInFolder/ComponentInSub `; exports[`swizzle eject > ComponentInFolder TS > ComponentInFolder/ComponentInSubFolder/index.tsx 1`] = ` -"import React from 'react'; - -export default function ComponentInSubFolder() { +"export default function ComponentInSubFolder() { return
ComponentInSubFolder
; } " @@ -84,9 +82,7 @@ exports[`swizzle eject > ComponentInFolder TS > ComponentInFolder/Sibling.css 1` `; exports[`swizzle eject > ComponentInFolder TS > ComponentInFolder/Sibling.tsx 1`] = ` -"import React from 'react'; - -export default function Sibling() { +"export default function Sibling() { return
Sibling
; } " @@ -100,9 +96,7 @@ exports[`swizzle eject > ComponentInFolder TS > ComponentInFolder/index.css 1`] `; exports[`swizzle eject > ComponentInFolder TS > ComponentInFolder/index.tsx 1`] = ` -"import React from 'react'; - -export default function ComponentInFolder() { +"export default function ComponentInFolder() { return
ComponentInFolder
; } " @@ -160,9 +154,7 @@ exports[`swizzle eject > ComponentInFolder/ComponentInSubFolder TS > ComponentIn `; exports[`swizzle eject > ComponentInFolder/ComponentInSubFolder TS > ComponentInFolder/ComponentInSubFolder/index.tsx 1`] = ` -"import React from 'react'; - -export default function ComponentInSubFolder() { +"export default function ComponentInSubFolder() { return
ComponentInSubFolder
; } " @@ -213,9 +205,7 @@ exports[`swizzle eject > ComponentInFolder/Sibling TS > ComponentInFolder/Siblin `; exports[`swizzle eject > ComponentInFolder/Sibling TS > ComponentInFolder/Sibling.tsx 1`] = ` -"import React from 'react'; - -export default function Sibling() { +"export default function Sibling() { return
Sibling
; } " @@ -248,9 +238,7 @@ exports[`swizzle eject > FirstLevelComponent TS > FirstLevelComponent.css 1`] = `; exports[`swizzle eject > FirstLevelComponent TS > FirstLevelComponent.tsx 1`] = ` -"import React from 'react'; - -export default function FirstLevelComponent() { +"export default function FirstLevelComponent() { return
First level component
; } " @@ -263,8 +251,7 @@ exports[`swizzle eject > FirstLevelComponent TS > theme dir tree 1`] = ` `; exports[`swizzle wrap > ComponentInFolder JS > ComponentInFolder/index.js 1`] = ` -"import React from 'react'; -import ComponentInFolder from '@theme-original/ComponentInFolder'; +"import ComponentInFolder from '@theme-original/ComponentInFolder'; export default function ComponentInFolderWrapper(props) { return ( @@ -283,7 +270,7 @@ exports[`swizzle wrap > ComponentInFolder JS > theme dir tree 1`] = ` `; exports[`swizzle wrap > ComponentInFolder TS > ComponentInFolder/index.tsx 1`] = ` -"import React, {type ReactNode} from 'react'; +"import type {ReactNode} from 'react'; import ComponentInFolder from '@theme-original/ComponentInFolder'; import type ComponentInFolderType from '@theme/ComponentInFolder'; import type {WrapperProps} from '@docusaurus/types'; @@ -307,8 +294,7 @@ exports[`swizzle wrap > ComponentInFolder TS > theme dir tree 1`] = ` `; exports[`swizzle wrap > ComponentInFolder/ComponentInSubFolder JS > ComponentInFolder/ComponentInSubFolder/index.js 1`] = ` -"import React from 'react'; -import ComponentInSubFolder from '@theme-original/ComponentInFolder/ComponentInSubFolder'; +"import ComponentInSubFolder from '@theme-original/ComponentInFolder/ComponentInSubFolder'; export default function ComponentInSubFolderWrapper(props) { return ( @@ -328,7 +314,7 @@ exports[`swizzle wrap > ComponentInFolder/ComponentInSubFolder JS > theme dir tr `; exports[`swizzle wrap > ComponentInFolder/ComponentInSubFolder TS > ComponentInFolder/ComponentInSubFolder/index.tsx 1`] = ` -"import React, {type ReactNode} from 'react'; +"import type {ReactNode} from 'react'; import ComponentInSubFolder from '@theme-original/ComponentInFolder/ComponentInSubFolder'; import type ComponentInSubFolderType from '@theme/ComponentInFolder/ComponentInSubFolder'; import type {WrapperProps} from '@docusaurus/types'; @@ -353,8 +339,7 @@ exports[`swizzle wrap > ComponentInFolder/ComponentInSubFolder TS > theme dir tr `; exports[`swizzle wrap > ComponentInFolder/Sibling JS > ComponentInFolder/Sibling.js 1`] = ` -"import React from 'react'; -import Sibling from '@theme-original/ComponentInFolder/Sibling'; +"import Sibling from '@theme-original/ComponentInFolder/Sibling'; export default function SiblingWrapper(props) { return ( @@ -373,7 +358,7 @@ exports[`swizzle wrap > ComponentInFolder/Sibling JS > theme dir tree 1`] = ` `; exports[`swizzle wrap > ComponentInFolder/Sibling TS > ComponentInFolder/Sibling.tsx 1`] = ` -"import React, {type ReactNode} from 'react'; +"import type {ReactNode} from 'react'; import Sibling from '@theme-original/ComponentInFolder/Sibling'; import type SiblingType from '@theme/ComponentInFolder/Sibling'; import type {WrapperProps} from '@docusaurus/types'; @@ -397,8 +382,7 @@ exports[`swizzle wrap > ComponentInFolder/Sibling TS > theme dir tree 1`] = ` `; exports[`swizzle wrap > FirstLevelComponent JS > FirstLevelComponent.js 1`] = ` -"import React from 'react'; -import FirstLevelComponent from '@theme-original/FirstLevelComponent'; +"import FirstLevelComponent from '@theme-original/FirstLevelComponent'; export default function FirstLevelComponentWrapper(props) { return ( @@ -416,7 +400,7 @@ exports[`swizzle wrap > FirstLevelComponent JS > theme dir tree 1`] = ` `; exports[`swizzle wrap > FirstLevelComponent TS > FirstLevelComponent.tsx 1`] = ` -"import React, {type ReactNode} from 'react'; +"import type {ReactNode} from 'react'; import FirstLevelComponent from '@theme-original/FirstLevelComponent'; import type FirstLevelComponentType from '@theme/FirstLevelComponent'; import type {WrapperProps} from '@docusaurus/types'; diff --git a/packages/docusaurus/src/commands/swizzle/actions.ts b/packages/docusaurus/src/commands/swizzle/actions.ts index 6dc8e738c352..51251a1e9bdc 100644 --- a/packages/docusaurus/src/commands/swizzle/actions.ts +++ b/packages/docusaurus/src/commands/swizzle/actions.ts @@ -135,7 +135,7 @@ export async function wrap({ const toPath = path.resolve(siteDir, THEME_PATH, wrapperFileName); const content = typescript - ? `import React, {type ReactNode} from 'react'; + ? `import type {ReactNode} from 'react'; import ${componentName} from '@theme-${importType}/${themeComponentName}'; import type ${componentName}Type from '@theme/${themeComponentName}'; import type {WrapperProps} from '@docusaurus/types'; @@ -150,8 +150,7 @@ export default function ${wrapperComponentName}(props: Props): ReactNode { ); } ` - : `import React from 'react'; -import ${componentName} from '@theme-${importType}/${themeComponentName}'; + : `import ${componentName} from '@theme-${importType}/${themeComponentName}'; export default function ${wrapperComponentName}(props) { return ( diff --git a/packages/docusaurus/src/server/__tests__/__fixtures__/custom-site/pages/bar/baz.js b/packages/docusaurus/src/server/__tests__/__fixtures__/custom-site/pages/bar/baz.js index 7adde78fac7f..4a7db9a87eb7 100644 --- a/packages/docusaurus/src/server/__tests__/__fixtures__/custom-site/pages/bar/baz.js +++ b/packages/docusaurus/src/server/__tests__/__fixtures__/custom-site/pages/bar/baz.js @@ -5,6 +5,4 @@ * LICENSE file in the root directory of this source tree. */ -import React from 'react'; - export default () =>
Baz
; diff --git a/packages/docusaurus/src/server/__tests__/__fixtures__/custom-site/pages/foo.js b/packages/docusaurus/src/server/__tests__/__fixtures__/custom-site/pages/foo.js index 7bc9205c448c..7e502d16689d 100644 --- a/packages/docusaurus/src/server/__tests__/__fixtures__/custom-site/pages/foo.js +++ b/packages/docusaurus/src/server/__tests__/__fixtures__/custom-site/pages/foo.js @@ -5,6 +5,4 @@ * LICENSE file in the root directory of this source tree. */ -import React from 'react'; - export default () =>
Foo
; diff --git a/packages/docusaurus/src/server/__tests__/__fixtures__/custom-site/pages/foo/index.js b/packages/docusaurus/src/server/__tests__/__fixtures__/custom-site/pages/foo/index.js index dd69e918951a..0928eaaca026 100644 --- a/packages/docusaurus/src/server/__tests__/__fixtures__/custom-site/pages/foo/index.js +++ b/packages/docusaurus/src/server/__tests__/__fixtures__/custom-site/pages/foo/index.js @@ -5,6 +5,4 @@ * LICENSE file in the root directory of this source tree. */ -import React from 'react'; - export default () =>
Foo in subfolder
; diff --git a/packages/docusaurus/src/server/__tests__/__fixtures__/custom-site/pages/index.js b/packages/docusaurus/src/server/__tests__/__fixtures__/custom-site/pages/index.js index a126c09f1d54..3bda6d2ba692 100644 --- a/packages/docusaurus/src/server/__tests__/__fixtures__/custom-site/pages/index.js +++ b/packages/docusaurus/src/server/__tests__/__fixtures__/custom-site/pages/index.js @@ -5,6 +5,4 @@ * LICENSE file in the root directory of this source tree. */ -import React from 'react'; - export default () =>
Index
; diff --git a/tsconfig.base.json b/tsconfig.base.json index 3fa83a7e9051..2379cb5f9444 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -15,7 +15,10 @@ // Utility libraries will have source maps on, but plugins will not. "declarationMap": false, "sourceMap": false, + // Preserve JSX in emitted .js files (swizzle-able theme components) "jsx": "react-native", + // Resolve JSX types from react/jsx-runtime, no need to "import React" + "jsxImportSource": "react", "importHelpers": true, "noEmitHelpers": true, // Will be overridden in client projects From fa7c237d3b2dab73c2f7426657c0655840ff2791 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 2 Oct 2026 09:51:52 +0200 Subject: [PATCH 2/5] chore(lint): report unused React imports in packages (AI-assisted) With jsxPragma: null, the typescript-eslint scope manager no longer treats JSX as a reference to the in-scope `React` variable, so @typescript-eslint/no-unused-vars reports unused `import React`. Scoped to packages/ for now: the website still has 52 such imports. Co-Authored-By: Claude Opus 5.5 --- eslint.config.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/eslint.config.ts b/eslint.config.ts index fa9400af3f3c..54f876a183ae 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -82,7 +82,19 @@ const ignores = globalIgnores([ 'packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy', ]); -export default defineConfig(plugins, rules, ignores, { +// JSX runtime is automatic: JSX doesn't use the in-scope "React" variable +// This lets @typescript-eslint/no-unused-vars report useless React imports +// TODO apply to the website too, once its useless React imports are removed +const jsxRuntime = defineConfig({ + files: ['packages/**'], + languageOptions: { + parserOptions: { + jsxPragma: null, + }, + }, +}); + +export default defineConfig(plugins, rules, ignores, jsxRuntime, { languageOptions: { ecmaVersion: 2022, sourceType: 'module', From 112da9bbd2d849a99ad2562a8ca7e4610af1b8e7 Mon Sep 17 00:00:00 2001 From: slorber <749374+slorber@users.noreply.github.com> Date: Fri, 2 Oct 2026 07:55:36 +0000 Subject: [PATCH 3/5] refactor: apply lint autofix --- .../docusaurus-theme-classic/src/theme/Tabs/index.tsx | 3 ++- .../src/components/Collapsible/index.tsx | 3 ++- .../src/utils/skipToContentUtils.tsx | 8 ++------ .../docusaurus/src/client/exports/ComponentCreator.tsx | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/packages/docusaurus-theme-classic/src/theme/Tabs/index.tsx b/packages/docusaurus-theme-classic/src/theme/Tabs/index.tsx index 89393dfc30d8..88e158759a0b 100644 --- a/packages/docusaurus-theme-classic/src/theme/Tabs/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Tabs/index.tsx @@ -5,7 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type React from 'react'; +import {type ReactNode} from 'react'; import clsx from 'clsx'; import {ThemeClassNames} from '@docusaurus/theme-common'; import { diff --git a/packages/docusaurus-theme-common/src/components/Collapsible/index.tsx b/packages/docusaurus-theme-common/src/components/Collapsible/index.tsx index 8d77a59dd10f..874939a98c7d 100644 --- a/packages/docusaurus-theme-common/src/components/Collapsible/index.tsx +++ b/packages/docusaurus-theme-common/src/components/Collapsible/index.tsx @@ -5,7 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import React, { +import type React from 'react'; +import { useState, useEffect, useLayoutEffect, diff --git a/packages/docusaurus-theme-common/src/utils/skipToContentUtils.tsx b/packages/docusaurus-theme-common/src/utils/skipToContentUtils.tsx index fcc4228a6830..f7e5a02ede73 100644 --- a/packages/docusaurus-theme-common/src/utils/skipToContentUtils.tsx +++ b/packages/docusaurus-theme-common/src/utils/skipToContentUtils.tsx @@ -5,12 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import React, { - useCallback, - useRef, - type ComponentProps, - type ReactNode, -} from 'react'; +import type React from 'react'; +import {useCallback, useRef, type ComponentProps, type ReactNode} from 'react'; import {useHistory} from '@docusaurus/router'; import {translate} from '@docusaurus/Translate'; import {useLocationChange} from './useLocationChange'; diff --git a/packages/docusaurus/src/client/exports/ComponentCreator.tsx b/packages/docusaurus/src/client/exports/ComponentCreator.tsx index f9794daf2737..cff20f6d4a94 100644 --- a/packages/docusaurus/src/client/exports/ComponentCreator.tsx +++ b/packages/docusaurus/src/client/exports/ComponentCreator.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React from 'react'; +import type React from 'react'; import Loadable from 'react-loadable'; import routesChunkNames from '@generated/routesChunkNames'; import registry from '@generated/registry'; From dda22c5651d56a8712771590343fd8455c55d9b5 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 2 Oct 2026 12:43:07 +0200 Subject: [PATCH 4/5] refactor(website): remove unnecessary React imports, report them repo-wide (AI-assisted) Run the same codemod on the 52 website files (src, _dogfooding test pages, a blog post component) that import React without using it, and apply the ESLint jsxPragma: null guard to the whole repo instead of only packages/. Co-Authored-By: Claude Opus 5.5 --- eslint.config.ts | 17 ++++------------- website/_dogfooding/_pages tests/analytics.tsx | 2 +- website/_dogfooding/_pages tests/crashTest.tsx | 2 +- website/_dogfooding/_pages tests/embeds.tsx | 2 +- .../_pages tests/error-boundary-tests.tsx | 2 +- .../_pages tests/hydration-tests.tsx | 2 +- .../import-attributes/_JsxTests.jsx | 1 - .../import-attributes/_fixtures/js-fixture.js | 2 -- .../_pages tests/layout-no-children.tsx | 2 +- website/_dogfooding/_pages tests/link-tests.tsx | 2 +- .../_pages tests/live-playground-tests.tsx | 2 +- .../_pages tests/style-isolation/index.tsx | 2 +- .../_components/heavyComponent.tsx | 2 +- .../_dogfooding/_pages tests/z-index-tests.tsx | 2 +- .../ShowcaseCarousel.tsx | 2 +- .../components/BrowserWindow/IframeWindow.tsx | 2 +- website/src/components/BrowserWindow/index.tsx | 2 +- website/src/components/ConfigTabs.tsx | 2 +- .../ErrorBoundaryTestButton/index.tsx | 2 +- website/src/components/HackerNewsIcon.tsx | 2 +- website/src/components/Highlight.tsx | 2 +- .../NavbarItems/CustomDogfoodNavbarItem.tsx | 2 +- website/src/components/Playground/index.tsx | 2 +- website/src/components/ProductHuntCard.tsx | 1 - .../src/components/TeamProfileCards/index.tsx | 2 +- website/src/components/Tweet/index.tsx | 2 +- website/src/components/TweetQuote/index.tsx | 2 +- website/src/components/UpgradeGuide/index.tsx | 2 +- website/src/data/features.tsx | 2 +- website/src/data/quotes.tsx | 1 - website/src/data/tweets.tsx | 2 -- website/src/pages/examples/_myComponent.tsx | 2 +- .../_components/ClearAllButton/index.tsx | 2 +- .../_components/OperatorButton/index.tsx | 2 +- .../_components/ShowcaseTagSelect/index.tsx | 2 +- .../theme/ChangelogItem/Header/Author/index.tsx | 2 +- .../ChangelogItem/Header/Authors/index.tsx | 2 +- .../theme/ChangelogItem/Header/index.tsx | 2 +- .../changelog/theme/ChangelogItem/index.tsx | 2 +- .../theme/ChangelogList/Header/index.tsx | 2 +- .../changelog/theme/ChangelogList/index.tsx | 2 +- .../changelog/theme/ChangelogPage/index.tsx | 2 +- .../theme/ChangelogPaginator/index.tsx | 2 +- .../changelog/theme/Icon/Expand/index.tsx | 2 +- .../featureRequests/FeatureRequestsPage.tsx | 2 +- website/src/theme/Admonition/Types.tsx | 2 +- website/src/theme/CodeBlock/index.tsx | 2 +- website/src/theme/ColorModeToggle.tsx | 2 +- .../DocCategoryGeneratedIndexPage/index.tsx | 2 +- .../theme/DocSidebar/Desktop/Content/index.js | 1 - website/src/theme/Layout/index.tsx | 2 +- website/src/theme/ReactLiveScope/components.tsx | 2 +- .../ThemeProvider/TitleFormatter/index.tsx | 2 +- 53 files changed, 50 insertions(+), 67 deletions(-) diff --git a/eslint.config.ts b/eslint.config.ts index 54f876a183ae..43b962b27b76 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -82,19 +82,7 @@ const ignores = globalIgnores([ 'packages/docusaurus-plugin-ideal-image/src/theme/IdealImageLegacy', ]); -// JSX runtime is automatic: JSX doesn't use the in-scope "React" variable -// This lets @typescript-eslint/no-unused-vars report useless React imports -// TODO apply to the website too, once its useless React imports are removed -const jsxRuntime = defineConfig({ - files: ['packages/**'], - languageOptions: { - parserOptions: { - jsxPragma: null, - }, - }, -}); - -export default defineConfig(plugins, rules, ignores, jsxRuntime, { +export default defineConfig(plugins, rules, ignores, { languageOptions: { ecmaVersion: 2022, sourceType: 'module', @@ -106,6 +94,9 @@ export default defineConfig(plugins, rules, ignores, jsxRuntime, { }, parserOptions: { // projectService: true, + // JSX runtime is automatic: JSX doesn't use the in-scope "React" variable + // This lets @typescript-eslint/no-unused-vars report useless React imports + jsxPragma: null, }, }, diff --git a/website/_dogfooding/_pages tests/analytics.tsx b/website/_dogfooding/_pages tests/analytics.tsx index 5c5e4dc89eac..54a0632ff58d 100644 --- a/website/_dogfooding/_pages tests/analytics.tsx +++ b/website/_dogfooding/_pages tests/analytics.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Layout from '@theme/Layout'; import Heading from '@theme/Heading'; diff --git a/website/_dogfooding/_pages tests/crashTest.tsx b/website/_dogfooding/_pages tests/crashTest.tsx index 9408d4ced540..43dd4fceccbc 100644 --- a/website/_dogfooding/_pages tests/crashTest.tsx +++ b/website/_dogfooding/_pages tests/crashTest.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import Layout from '@theme/Layout'; diff --git a/website/_dogfooding/_pages tests/embeds.tsx b/website/_dogfooding/_pages tests/embeds.tsx index 149203c94863..e5c982a68c9d 100644 --- a/website/_dogfooding/_pages tests/embeds.tsx +++ b/website/_dogfooding/_pages tests/embeds.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Layout from '@theme/Layout'; import Heading from '@theme/Heading'; import IframeWindow from '@site/src/components/BrowserWindow/IframeWindow'; diff --git a/website/_dogfooding/_pages tests/error-boundary-tests.tsx b/website/_dogfooding/_pages tests/error-boundary-tests.tsx index 473f3ea7809c..56942eef67b8 100644 --- a/website/_dogfooding/_pages tests/error-boundary-tests.tsx +++ b/website/_dogfooding/_pages tests/error-boundary-tests.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Interpolate from '@docusaurus/Interpolate'; import Layout from '@theme/Layout'; import Heading from '@theme/Heading'; diff --git a/website/_dogfooding/_pages tests/hydration-tests.tsx b/website/_dogfooding/_pages tests/hydration-tests.tsx index f77741d62bb2..debfb291bd38 100644 --- a/website/_dogfooding/_pages tests/hydration-tests.tsx +++ b/website/_dogfooding/_pages tests/hydration-tests.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Link from '@docusaurus/Link'; import Layout from '@theme/Layout'; diff --git a/website/_dogfooding/_pages tests/import-attributes/_JsxTests.jsx b/website/_dogfooding/_pages tests/import-attributes/_JsxTests.jsx index 07e828c41308..e36ff39190eb 100644 --- a/website/_dogfooding/_pages tests/import-attributes/_JsxTests.jsx +++ b/website/_dogfooding/_pages tests/import-attributes/_JsxTests.jsx @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -import React from 'react'; import Heading from '@theme/Heading'; import TextImportTest from './_TextImportTest'; diff --git a/website/_dogfooding/_pages tests/import-attributes/_fixtures/js-fixture.js b/website/_dogfooding/_pages tests/import-attributes/_fixtures/js-fixture.js index 82bd5c601940..5d7e0a3b9b93 100644 --- a/website/_dogfooding/_pages tests/import-attributes/_fixtures/js-fixture.js +++ b/website/_dogfooding/_pages tests/import-attributes/_fixtures/js-fixture.js @@ -5,8 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -import React from 'react'; - export default function JsFixture() { return
JS fixture
; } diff --git a/website/_dogfooding/_pages tests/layout-no-children.tsx b/website/_dogfooding/_pages tests/layout-no-children.tsx index 74e6735954e9..d359f8e395d6 100644 --- a/website/_dogfooding/_pages tests/layout-no-children.tsx +++ b/website/_dogfooding/_pages tests/layout-no-children.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Layout from '@theme/Layout'; // See https://github.com/facebook/docusaurus/issues/6337#issuecomment-1012913647 diff --git a/website/_dogfooding/_pages tests/link-tests.tsx b/website/_dogfooding/_pages tests/link-tests.tsx index 0af61f736728..514d1d897255 100644 --- a/website/_dogfooding/_pages tests/link-tests.tsx +++ b/website/_dogfooding/_pages tests/link-tests.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode, useRef} from 'react'; +import {type ReactNode, useRef} from 'react'; import Link from '@docusaurus/Link'; import Layout from '@theme/Layout'; diff --git a/website/_dogfooding/_pages tests/live-playground-tests.tsx b/website/_dogfooding/_pages tests/live-playground-tests.tsx index 8abb52dce865..00e47456e98a 100644 --- a/website/_dogfooding/_pages tests/live-playground-tests.tsx +++ b/website/_dogfooding/_pages tests/live-playground-tests.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Layout from '@theme/Layout'; import Heading from '@theme/Heading'; import Playground from '@theme/Playground'; diff --git a/website/_dogfooding/_pages tests/style-isolation/index.tsx b/website/_dogfooding/_pages tests/style-isolation/index.tsx index a5571c54fac0..24ee20e907e9 100644 --- a/website/_dogfooding/_pages tests/style-isolation/index.tsx +++ b/website/_dogfooding/_pages tests/style-isolation/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import Link from '@docusaurus/Link'; import Layout from '@theme/Layout'; diff --git a/website/_dogfooding/_pages tests/suspense-tests/_components/heavyComponent.tsx b/website/_dogfooding/_pages tests/suspense-tests/_components/heavyComponent.tsx index bb629066ad48..0094e8518ce9 100644 --- a/website/_dogfooding/_pages tests/suspense-tests/_components/heavyComponent.tsx +++ b/website/_dogfooding/_pages tests/suspense-tests/_components/heavyComponent.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; export default function HeavyComponent(): ReactNode { return ( diff --git a/website/_dogfooding/_pages tests/z-index-tests.tsx b/website/_dogfooding/_pages tests/z-index-tests.tsx index c9d5338c81a5..381cd3b1f132 100644 --- a/website/_dogfooding/_pages tests/z-index-tests.tsx +++ b/website/_dogfooding/_pages tests/z-index-tests.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Layout from '@theme/Layout'; export default function zIndexTest(): ReactNode { diff --git a/website/blog/2022/08-01-announcing-docusaurus-2.0/ShowcaseCarousel.tsx b/website/blog/2022/08-01-announcing-docusaurus-2.0/ShowcaseCarousel.tsx index 22e54897e7a3..32c974049337 100644 --- a/website/blog/2022/08-01-announcing-docusaurus-2.0/ShowcaseCarousel.tsx +++ b/website/blog/2022/08-01-announcing-docusaurus-2.0/ShowcaseCarousel.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ComponentProps, type ReactNode, useRef} from 'react'; +import {type ComponentProps, type ReactNode, useRef} from 'react'; import clsx from 'clsx'; import Link from '@docusaurus/Link'; diff --git a/website/src/components/BrowserWindow/IframeWindow.tsx b/website/src/components/BrowserWindow/IframeWindow.tsx index 2fe9d74f90f1..ca6c6eb1abfc 100644 --- a/website/src/components/BrowserWindow/IframeWindow.tsx +++ b/website/src/components/BrowserWindow/IframeWindow.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import BrowserWindow from './index'; diff --git a/website/src/components/BrowserWindow/index.tsx b/website/src/components/BrowserWindow/index.tsx index 6f096d59df10..995cc590dc99 100644 --- a/website/src/components/BrowserWindow/index.tsx +++ b/website/src/components/BrowserWindow/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type CSSProperties, type ReactNode} from 'react'; +import type {CSSProperties, ReactNode} from 'react'; import clsx from 'clsx'; import styles from './styles.module.css'; diff --git a/website/src/components/ConfigTabs.tsx b/website/src/components/ConfigTabs.tsx index c49d80ce3215..78e9304f6495 100644 --- a/website/src/components/ConfigTabs.tsx +++ b/website/src/components/ConfigTabs.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Link from '@docusaurus/Link'; import {useActiveVersion} from '@docusaurus/plugin-content-docs/client'; import Translate, {translate} from '@docusaurus/Translate'; diff --git a/website/src/components/ErrorBoundaryTestButton/index.tsx b/website/src/components/ErrorBoundaryTestButton/index.tsx index d944962c6862..772783d43cb2 100644 --- a/website/src/components/ErrorBoundaryTestButton/index.tsx +++ b/website/src/components/ErrorBoundaryTestButton/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode, useState} from 'react'; +import {type ReactNode, useState} from 'react'; export default function ErrorBoundaryTestButton({ children = 'Boom!', diff --git a/website/src/components/HackerNewsIcon.tsx b/website/src/components/HackerNewsIcon.tsx index 872e241e854e..a3d7880099cd 100644 --- a/website/src/components/HackerNewsIcon.tsx +++ b/website/src/components/HackerNewsIcon.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Link from '@docusaurus/Link'; export default function HackerNewsIcon({ diff --git a/website/src/components/Highlight.tsx b/website/src/components/Highlight.tsx index 8e0599f17e3b..4758bbdd3e93 100644 --- a/website/src/components/Highlight.tsx +++ b/website/src/components/Highlight.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; export default function Highlight({ children, diff --git a/website/src/components/NavbarItems/CustomDogfoodNavbarItem.tsx b/website/src/components/NavbarItems/CustomDogfoodNavbarItem.tsx index a23c2362ae9d..d48ff3656891 100644 --- a/website/src/components/NavbarItems/CustomDogfoodNavbarItem.tsx +++ b/website/src/components/NavbarItems/CustomDogfoodNavbarItem.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {useLocation} from '@docusaurus/router'; // used to dogfood custom navbar elements are possible diff --git a/website/src/components/Playground/index.tsx b/website/src/components/Playground/index.tsx index 68406461e0d1..c52859464f0b 100644 --- a/website/src/components/Playground/index.tsx +++ b/website/src/components/Playground/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import Translate from '@docusaurus/Translate'; import Link from '@docusaurus/Link'; diff --git a/website/src/components/ProductHuntCard.tsx b/website/src/components/ProductHuntCard.tsx index 3f5b0a6c29e2..b82fb244ed5d 100644 --- a/website/src/components/ProductHuntCard.tsx +++ b/website/src/components/ProductHuntCard.tsx @@ -6,7 +6,6 @@ */ import type {ComponentProps, ReactNode} from 'react'; -import React from 'react'; import clsx from 'clsx'; import Link from '@docusaurus/Link'; diff --git a/website/src/components/TeamProfileCards/index.tsx b/website/src/components/TeamProfileCards/index.tsx index 14111b2e557f..40dc069d4b80 100644 --- a/website/src/components/TeamProfileCards/index.tsx +++ b/website/src/components/TeamProfileCards/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Translate from '@docusaurus/Translate'; import Link from '@docusaurus/Link'; import Heading from '@theme/Heading'; diff --git a/website/src/components/Tweet/index.tsx b/website/src/components/Tweet/index.tsx index 97d40402890b..3a7fff80562d 100644 --- a/website/src/components/Tweet/index.tsx +++ b/website/src/components/Tweet/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; diff --git a/website/src/components/TweetQuote/index.tsx b/website/src/components/TweetQuote/index.tsx index 61597a40058e..0d28a6fe7414 100644 --- a/website/src/components/TweetQuote/index.tsx +++ b/website/src/components/TweetQuote/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; diff --git a/website/src/components/UpgradeGuide/index.tsx b/website/src/components/UpgradeGuide/index.tsx index 0d3fbdbd4f9f..bb360adce8a2 100644 --- a/website/src/components/UpgradeGuide/index.tsx +++ b/website/src/components/UpgradeGuide/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import { useLatestVersion, useActiveDocContext, diff --git a/website/src/data/features.tsx b/website/src/data/features.tsx index 015f9d82b9d9..d34a7d976e89 100644 --- a/website/src/data/features.tsx +++ b/website/src/data/features.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Translate, {translate} from '@docusaurus/Translate'; export type FeatureItem = { diff --git a/website/src/data/quotes.tsx b/website/src/data/quotes.tsx index d5aa0e7fed5f..ff6097dcda08 100644 --- a/website/src/data/quotes.tsx +++ b/website/src/data/quotes.tsx @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -import React from 'react'; import Translate, {translate} from '@docusaurus/Translate'; const QUOTES = [ diff --git a/website/src/data/tweets.tsx b/website/src/data/tweets.tsx index 1a7face35106..6c332a0e1f72 100644 --- a/website/src/data/tweets.tsx +++ b/website/src/data/tweets.tsx @@ -7,8 +7,6 @@ /* eslint-disable @docusaurus/no-untranslated-text */ -import React from 'react'; - import type {Props as Tweet} from '../components/Tweet'; export type TweetItem = Tweet & { diff --git a/website/src/pages/examples/_myComponent.tsx b/website/src/pages/examples/_myComponent.tsx index 32e4abddd8ff..cf2548abced0 100644 --- a/website/src/pages/examples/_myComponent.tsx +++ b/website/src/pages/examples/_myComponent.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {useState} from 'react'; +import {useState} from 'react'; export default function MyComponent() { const [bool, setBool] = useState(false); diff --git a/website/src/pages/showcase/_components/ClearAllButton/index.tsx b/website/src/pages/showcase/_components/ClearAllButton/index.tsx index 372706062ee3..f0361afb49e5 100644 --- a/website/src/pages/showcase/_components/ClearAllButton/index.tsx +++ b/website/src/pages/showcase/_components/ClearAllButton/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {useClearQueryString} from '@docusaurus/theme-common'; export default function ClearAllButton(): ReactNode { diff --git a/website/src/pages/showcase/_components/OperatorButton/index.tsx b/website/src/pages/showcase/_components/OperatorButton/index.tsx index 927844af917e..a5a7506c3a26 100644 --- a/website/src/pages/showcase/_components/OperatorButton/index.tsx +++ b/website/src/pages/showcase/_components/OperatorButton/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {useId} from 'react'; +import {useId} from 'react'; import clsx from 'clsx'; import {useOperator} from '../../_utils'; diff --git a/website/src/pages/showcase/_components/ShowcaseTagSelect/index.tsx b/website/src/pages/showcase/_components/ShowcaseTagSelect/index.tsx index 4a1e22820c52..279a6f0146cc 100644 --- a/website/src/pages/showcase/_components/ShowcaseTagSelect/index.tsx +++ b/website/src/pages/showcase/_components/ShowcaseTagSelect/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, { +import { useCallback, type ComponentProps, type ReactNode, diff --git a/website/src/plugins/changelog/theme/ChangelogItem/Header/Author/index.tsx b/website/src/plugins/changelog/theme/ChangelogItem/Header/Author/index.tsx index 90a3497dd1d2..d6eefc6469df 100644 --- a/website/src/plugins/changelog/theme/ChangelogItem/Header/Author/index.tsx +++ b/website/src/plugins/changelog/theme/ChangelogItem/Header/Author/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import Link from '@docusaurus/Link'; import type {Props} from '@theme/Blog/Components/Author'; diff --git a/website/src/plugins/changelog/theme/ChangelogItem/Header/Authors/index.tsx b/website/src/plugins/changelog/theme/ChangelogItem/Header/Authors/index.tsx index 9869799df45e..271d2a7861e7 100644 --- a/website/src/plugins/changelog/theme/ChangelogItem/Header/Authors/index.tsx +++ b/website/src/plugins/changelog/theme/ChangelogItem/Header/Authors/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode, useState} from 'react'; +import {type ReactNode, useState} from 'react'; import clsx from 'clsx'; import {useBlogPost} from '@docusaurus/plugin-content-blog/client'; import ChangelogItemHeaderAuthor from '@theme/ChangelogItem/Header/Author'; diff --git a/website/src/plugins/changelog/theme/ChangelogItem/Header/index.tsx b/website/src/plugins/changelog/theme/ChangelogItem/Header/index.tsx index a8d591e4bc53..6b73fe50878c 100644 --- a/website/src/plugins/changelog/theme/ChangelogItem/Header/index.tsx +++ b/website/src/plugins/changelog/theme/ChangelogItem/Header/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {useBlogPost} from '@docusaurus/plugin-content-blog/client'; import BlogPostItemHeaderTitle from '@theme/BlogPostItem/Header/Title'; diff --git a/website/src/plugins/changelog/theme/ChangelogItem/index.tsx b/website/src/plugins/changelog/theme/ChangelogItem/index.tsx index 166c3456249d..747d77269219 100644 --- a/website/src/plugins/changelog/theme/ChangelogItem/index.tsx +++ b/website/src/plugins/changelog/theme/ChangelogItem/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import ChangelogItemHeader from '@theme/ChangelogItem/Header'; import type {Props} from '@theme/BlogPostItem'; import BlogPostItemContainer from '@theme/BlogPostItem/Container'; diff --git a/website/src/plugins/changelog/theme/ChangelogList/Header/index.tsx b/website/src/plugins/changelog/theme/ChangelogList/Header/index.tsx index f475d50b8cde..8d3e7a9ef3af 100644 --- a/website/src/plugins/changelog/theme/ChangelogList/Header/index.tsx +++ b/website/src/plugins/changelog/theme/ChangelogList/Header/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Translate from '@docusaurus/Translate'; import Link from '@docusaurus/Link'; import Heading from '@theme/Heading'; diff --git a/website/src/plugins/changelog/theme/ChangelogList/index.tsx b/website/src/plugins/changelog/theme/ChangelogList/index.tsx index 9163c4bf6d10..b5b2a26d217f 100644 --- a/website/src/plugins/changelog/theme/ChangelogList/index.tsx +++ b/website/src/plugins/changelog/theme/ChangelogList/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import { PageMetadata, diff --git a/website/src/plugins/changelog/theme/ChangelogPage/index.tsx b/website/src/plugins/changelog/theme/ChangelogPage/index.tsx index 3f3972e85fc9..c7a8a85f3c3f 100644 --- a/website/src/plugins/changelog/theme/ChangelogPage/index.tsx +++ b/website/src/plugins/changelog/theme/ChangelogPage/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import Translate from '@docusaurus/Translate'; import Link from '@docusaurus/Link'; diff --git a/website/src/plugins/changelog/theme/ChangelogPaginator/index.tsx b/website/src/plugins/changelog/theme/ChangelogPaginator/index.tsx index ac1ca4f10739..ee03d8ddae4a 100644 --- a/website/src/plugins/changelog/theme/ChangelogPaginator/index.tsx +++ b/website/src/plugins/changelog/theme/ChangelogPaginator/index.tsx @@ -7,7 +7,7 @@ // Changed the text labels. -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Translate, {translate} from '@docusaurus/Translate'; import PaginatorNavLink from '@theme/PaginatorNavLink'; import type {Props} from '@theme/BlogPostPaginator'; diff --git a/website/src/plugins/changelog/theme/Icon/Expand/index.tsx b/website/src/plugins/changelog/theme/Icon/Expand/index.tsx index 9b0fb800a40a..679bc86ee3c9 100644 --- a/website/src/plugins/changelog/theme/Icon/Expand/index.tsx +++ b/website/src/plugins/changelog/theme/Icon/Expand/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import type {Props} from '@theme/Icon/Expand'; diff --git a/website/src/plugins/featureRequests/FeatureRequestsPage.tsx b/website/src/plugins/featureRequests/FeatureRequestsPage.tsx index 502e9afd7279..8d5ba95aeb3e 100644 --- a/website/src/plugins/featureRequests/FeatureRequestsPage.tsx +++ b/website/src/plugins/featureRequests/FeatureRequestsPage.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode, useEffect, useState} from 'react'; +import {type ReactNode, useEffect, useState} from 'react'; import clsx from 'clsx'; import {useColorMode} from '@docusaurus/theme-common'; import Layout from '@theme/Layout'; diff --git a/website/src/theme/Admonition/Types.tsx b/website/src/theme/Admonition/Types.tsx index a4b5df33e351..c118915ba8d5 100644 --- a/website/src/theme/Admonition/Types.tsx +++ b/website/src/theme/Admonition/Types.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import type {Props} from '@theme/Admonition'; import DefaultAdmonitionTypes from '@theme-original/Admonition/Types'; import Heading from '@theme/Heading'; diff --git a/website/src/theme/CodeBlock/index.tsx b/website/src/theme/CodeBlock/index.tsx index 172095db454e..dc1056c570af 100644 --- a/website/src/theme/CodeBlock/index.tsx +++ b/website/src/theme/CodeBlock/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import CodeBlock from '@theme-original/CodeBlock'; import type {Props} from '@theme/CodeBlock'; diff --git a/website/src/theme/ColorModeToggle.tsx b/website/src/theme/ColorModeToggle.tsx index 70df415859f7..254cb102fbf2 100644 --- a/website/src/theme/ColorModeToggle.tsx +++ b/website/src/theme/ColorModeToggle.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import OriginalToggle from '@theme-original/ColorModeToggle'; import { lightStorage, diff --git a/website/src/theme/DocCategoryGeneratedIndexPage/index.tsx b/website/src/theme/DocCategoryGeneratedIndexPage/index.tsx index 518fca9fc898..0b5285bcf8ad 100644 --- a/website/src/theme/DocCategoryGeneratedIndexPage/index.tsx +++ b/website/src/theme/DocCategoryGeneratedIndexPage/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import {useLayoutDoc} from '@docusaurus/plugin-content-docs/client'; import Link from '@docusaurus/Link'; import Translate from '@docusaurus/Translate'; diff --git a/website/src/theme/DocSidebar/Desktop/Content/index.js b/website/src/theme/DocSidebar/Desktop/Content/index.js index 19d30bc26001..387752be3185 100644 --- a/website/src/theme/DocSidebar/Desktop/Content/index.js +++ b/website/src/theme/DocSidebar/Desktop/Content/index.js @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -import React from 'react'; import {useLocation} from '@docusaurus/router'; import Content from '@theme-original/DocSidebar/Desktop/Content'; diff --git a/website/src/theme/Layout/index.tsx b/website/src/theme/Layout/index.tsx index 84e154ec19cd..e1c821b55bb0 100644 --- a/website/src/theme/Layout/index.tsx +++ b/website/src/theme/Layout/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import Layout from '@theme-original/Layout'; import type {Props} from '@theme/Layout'; diff --git a/website/src/theme/ReactLiveScope/components.tsx b/website/src/theme/ReactLiveScope/components.tsx index 404c4f3d2e46..38b1a91f048b 100644 --- a/website/src/theme/ReactLiveScope/components.tsx +++ b/website/src/theme/ReactLiveScope/components.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ComponentProps, type ReactNode} from 'react'; +import type {ComponentProps, ReactNode} from 'react'; export function ButtonExample(props: ComponentProps<'button'>): ReactNode { return ( diff --git a/website/src/theme/ThemeProvider/TitleFormatter/index.tsx b/website/src/theme/ThemeProvider/TitleFormatter/index.tsx index 16d63b237995..25ce663a2a9e 100644 --- a/website/src/theme/ThemeProvider/TitleFormatter/index.tsx +++ b/website/src/theme/ThemeProvider/TitleFormatter/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ComponentProps, type ReactNode} from 'react'; +import type {ComponentProps, ReactNode} from 'react'; import {TitleFormatterProvider} from '@docusaurus/theme-common/internal'; import type {Props} from '@theme/ThemeProvider/TitleFormatter'; From a2e0f9640389c3b1d39c500a705a0f773c7225f6 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 2 Oct 2026 12:45:58 +0200 Subject: [PATCH 5/5] refactor: use import type for type-only React imports (AI-assisted) Apply the consistent-type-imports autofix to website files that only use React in type positions (now detected with jsxPragma: null), and normalize `import {type X}` to `import type {X}`. Co-Authored-By: Claude Opus 5.5 --- packages/docusaurus-theme-classic/src/theme/Tabs/index.tsx | 2 +- .../_pages tests/import-attributes/_TextImportTest.tsx | 2 +- .../_dogfooding/_pages tests/import-attributes/_TsxTests.tsx | 2 +- .../_pages tests/import-attributes/_fixtures/tsx-fixture.tsx | 2 +- website/src/components/ColorGenerator/index.tsx | 3 ++- website/src/pages/showcase/_components/FavoriteIcon/index.tsx | 3 ++- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/docusaurus-theme-classic/src/theme/Tabs/index.tsx b/packages/docusaurus-theme-classic/src/theme/Tabs/index.tsx index 88e158759a0b..474c4fb6bd59 100644 --- a/packages/docusaurus-theme-classic/src/theme/Tabs/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Tabs/index.tsx @@ -6,7 +6,7 @@ */ import type React from 'react'; -import {type ReactNode} from 'react'; +import type {ReactNode} from 'react'; import clsx from 'clsx'; import {ThemeClassNames} from '@docusaurus/theme-common'; import { diff --git a/website/_dogfooding/_pages tests/import-attributes/_TextImportTest.tsx b/website/_dogfooding/_pages tests/import-attributes/_TextImportTest.tsx index f608ae50adb2..4e85a594d619 100644 --- a/website/_dogfooding/_pages tests/import-attributes/_TextImportTest.tsx +++ b/website/_dogfooding/_pages tests/import-attributes/_TextImportTest.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React from 'react'; +import type React from 'react'; import CodeBlock from '@theme/CodeBlock'; import Heading from '@theme/Heading'; diff --git a/website/_dogfooding/_pages tests/import-attributes/_TsxTests.tsx b/website/_dogfooding/_pages tests/import-attributes/_TsxTests.tsx index f3d6e45408ee..e6ffc9bc0e85 100644 --- a/website/_dogfooding/_pages tests/import-attributes/_TsxTests.tsx +++ b/website/_dogfooding/_pages tests/import-attributes/_TsxTests.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React from 'react'; +import type React from 'react'; import Heading from '@theme/Heading'; import TextImportTest from './_TextImportTest'; diff --git a/website/_dogfooding/_pages tests/import-attributes/_fixtures/tsx-fixture.tsx b/website/_dogfooding/_pages tests/import-attributes/_fixtures/tsx-fixture.tsx index b542f18b1331..f513d343c018 100644 --- a/website/_dogfooding/_pages tests/import-attributes/_fixtures/tsx-fixture.tsx +++ b/website/_dogfooding/_pages tests/import-attributes/_fixtures/tsx-fixture.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React from 'react'; +import type React from 'react'; export default function TsxFixture({name}: {name: string}): React.JSX.Element { return
TSX fixture {name}
; diff --git a/website/src/components/ColorGenerator/index.tsx b/website/src/components/ColorGenerator/index.tsx index 71d6b4442505..bd839bfab395 100644 --- a/website/src/components/ColorGenerator/index.tsx +++ b/website/src/components/ColorGenerator/index.tsx @@ -5,7 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ReactNode, useEffect, useState} from 'react'; +import type React from 'react'; +import {type ReactNode, useEffect, useState} from 'react'; import clsx from 'clsx'; import Color from 'color'; import Link from '@docusaurus/Link'; diff --git a/website/src/pages/showcase/_components/FavoriteIcon/index.tsx b/website/src/pages/showcase/_components/FavoriteIcon/index.tsx index cf0c6ab2ad35..f950bc4cf03c 100644 --- a/website/src/pages/showcase/_components/FavoriteIcon/index.tsx +++ b/website/src/pages/showcase/_components/FavoriteIcon/index.tsx @@ -5,7 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import React, {type ComponentProps} from 'react'; +import type React from 'react'; +import type {ComponentProps} from 'react'; import clsx from 'clsx'; import styles from './styles.module.css';