{"library":"remark-lint-no-duplicate-headings-in-section","title":"remark-lint-no-duplicate-headings-in-section","description":"A remark-lint rule that warns when the same heading text appears multiple times within a single section. Version 4.0.1 is the current stable release. This package is part of the remark-lint ecosystem, which provides a variety of linting rules for markdown. It helps ensure heading uniqueness per section, catching potential duplication mistakes. Unlike other lint rules that check overall duplicate headings, this rule scopes duplicates to sections, allowing the same heading text in different sections. It supports MDX and is ESM-only from version 4+. Install via npm, use with unified processor or CLI.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install remark-lint-no-duplicate-headings-in-section"],"cli":null},"imports":["import remarkLintNoDuplicateHeadingsInSection from 'remark-lint-no-duplicate-headings-in-section'","import remarkLintNoDuplicateHeadingsInSection from 'remark-lint-no-duplicate-headings-in-section'",".use(remarkLintNoDuplicateHeadingsInSection)"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { unified } from 'unified'\nimport remarkParse from 'remark-parse'\nimport remarkStringify from 'remark-stringify'\nimport remarkLint from 'remark-lint'\nimport remarkLintNoDuplicateHeadingsInSection from 'remark-lint-no-duplicate-headings-in-section'\nimport { reporter } from 'vfile-reporter'\n\nconst file = await unified()\n  .use(remarkParse)\n  .use(remarkLint)\n  .use(remarkLintNoDuplicateHeadingsInSection)\n  .use(remarkStringify)\n  .process('# Planets\\n\\n## Mars\\n\\n### Discovery\\n\\n### Discovery')\n\nconsole.error(reporter(file))","lang":"typescript","description":"Shows how to use the rule with unified to detect duplicate headings in a section.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}