diff --git a/.eslintrc.js b/.eslintrc.js index c76cc234dc9f..56851d0247c3 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -374,6 +374,7 @@ module.exports = { // locals must be justified with a disable comment. '@typescript-eslint/no-unused-vars': [ERROR, {ignoreRestSiblings: true}], '@typescript-eslint/prefer-optional-chain': ERROR, + '@docusaurus/no-html-links': ERROR, '@docusaurus/no-untranslated-text': [ WARNING, { diff --git a/packages/docusaurus-theme-classic/src/theme/EditThisPage/index.tsx b/packages/docusaurus-theme-classic/src/theme/EditThisPage/index.tsx index ede0b5cbed62..1fbfb173ab5f 100644 --- a/packages/docusaurus-theme-classic/src/theme/EditThisPage/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/EditThisPage/index.tsx @@ -8,22 +8,19 @@ import React from 'react'; import Translate from '@docusaurus/Translate'; import {ThemeClassNames} from '@docusaurus/theme-common'; +import Link from '@docusaurus/Link'; import IconEdit from '@theme/Icon/Edit'; import type {Props} from '@theme/EditThisPage'; export default function EditThisPage({editUrl}: Props): JSX.Element { return ( - + Edit this page - + ); } diff --git a/packages/docusaurus-theme-classic/src/theme/Heading/index.tsx b/packages/docusaurus-theme-classic/src/theme/Heading/index.tsx index 3bb321285593..00ef3f52da13 100644 --- a/packages/docusaurus-theme-classic/src/theme/Heading/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Heading/index.tsx @@ -9,6 +9,7 @@ import React from 'react'; import clsx from 'clsx'; import {translate} from '@docusaurus/Translate'; import {useThemeConfig} from '@docusaurus/theme-common'; +import Link from '@docusaurus/Link'; import type {Props} from '@theme/Heading'; import styles from './styles.module.css'; @@ -34,16 +35,16 @@ export default function Heading({as: As, id, ...props}: Props): JSX.Element { )} id={id}> {props.children} - ​ - + ); } diff --git a/packages/docusaurus-theme-classic/src/theme/SkipToContent/index.tsx b/packages/docusaurus-theme-classic/src/theme/SkipToContent/index.tsx index 0ae5c02a559e..3200aeec7277 100644 --- a/packages/docusaurus-theme-classic/src/theme/SkipToContent/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/SkipToContent/index.tsx @@ -7,7 +7,6 @@ import React from 'react'; import {SkipToContentLink} from '@docusaurus/theme-common'; - import styles from './styles.module.css'; export default function SkipToContent(): JSX.Element { diff --git a/packages/docusaurus-theme-classic/src/theme/TOCItems/Tree.tsx b/packages/docusaurus-theme-classic/src/theme/TOCItems/Tree.tsx index 04ab3fc93bad..266feaba2c1b 100644 --- a/packages/docusaurus-theme-classic/src/theme/TOCItems/Tree.tsx +++ b/packages/docusaurus-theme-classic/src/theme/TOCItems/Tree.tsx @@ -6,6 +6,7 @@ */ import React from 'react'; +import Link from '@docusaurus/Link'; import type {Props} from '@theme/TOCItems/Tree'; // Recursive component rendering the toc tree @@ -22,12 +23,10 @@ function TOCItemTree({