Skip to content

Latest commit

 

History

History
31 lines (19 loc) · 684 Bytes

File metadata and controls

31 lines (19 loc) · 684 Bytes
slug /api/misc/@docusaurus/eslint-plugin/prefer-docusaurus-heading

prefer-docusaurus-heading

Ensures that the @theme/Heading theme component provided by Docusaurus theme-classic is used instead of <hn> tags for headings.

Rule Details {#details}

Examples of incorrect code for this rule:

<h1>This is heading 1</h1>

<h2>This is heading 2</h2>

<h3>This is heading 3</h3>

Examples of correct code for this rule:

import Heading from '@theme/Heading'

<Heading as='h1'>This is heading 1</Heading>

<Heading as='h2'>This is heading 2</Heading>

<Heading as='h3'>This is heading 3</Heading>