Registry /
testing / remark-lint-no-duplicate-headings
Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
remarkLintNoDuplicateHeadings
✓ import remarkLintNoDuplicateHeadings from 'remark-lint-no-duplicate-headings'
✗ const remarkLintNoDuplicateHeadings = require('remark-lint-no-duplicate-headings')
Package is ESM-only since v3; CommonJS require will fail.
remarkLintNoDuplicateHeadings
✓ import remarkLintNoDuplicateHeadings from 'remark-lint-no-duplicate-headings'
✗ import { remarkLintNoDuplicateHeadings } from 'remark-lint-no-duplicate-headings'
Default export, not named.
Type definitions
✓ No type imports needed; types are shipped with package.
✗ Attempting to import types separately like `import type { Options } from 'remark-lint-no-duplicate-headings'`
The plugin accepts no options, so no types are exported.
Runs linting on example.md, reporting duplicate headings. ESM-only, Node 16+.
import { unified } from 'unified'
import remarkParse from 'remark-parse'
import remarkStringify from 'remark-stringify'
import remarkLint from 'remark-lint'
import remarkLintNoDuplicateHeadings from 'remark-lint-no-duplicate-headings'
import { read } from 'to-vfile'
import { reporter } from 'vfile-reporter'
const file = await unified()
.use(remarkParse)
.use(remarkLint)
.use(remarkLintNoDuplicateHeadings)
.use(remarkStringify)
.process(await read('example.md'))
console.error(reporter(file))
remark --version
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module
Using CommonJS require() on an ESM-only package.
fixSwitch to ESM imports or use dynamic import().
TypeError: (0 , remarkLintNoDuplicateHeadings) is not a function
Importing named export instead of default.
fixUse `import remarkLintNoDuplicateHeadings from 'remark-lint-no-duplicate-headings'`.
Audit
Dependencies
unifiedrequiredPeer dependency for integration with remark-lint pipeline
remark-lintrequiredRequired to register and run lint rules