Registry /
testing / remark-lint-no-emphasis-as-heading
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.
remarkLintNoEmphasisAsHeading
✓ import remarkLintNoEmphasisAsHeading from 'remark-lint-no-emphasis-as-heading'
✗ import { remarkLintNoEmphasisAsHeading } from 'remark-lint-no-emphasis-as-heading'
Default export only; named import will fail. ESM-only since v4.
remarkLint
✓ import remarkLint from 'remark-lint'
✗ import { remarkLint } from 'remark-lint'
remark-lint also uses default export.
unified
✓ import { unified } from 'unified'
✗ import unified from 'unified'
unified uses named export.
Sets up unified with remark-lint and the no-emphasis-as-heading rule, processes a markdown file, and reports lint messages.
import remarkLint from 'remark-lint'
import remarkLintNoEmphasisAsHeading from 'remark-lint-no-emphasis-as-heading'
import remarkParse from 'remark-parse'
import remarkStringify from 'remark-stringify'
import { unified } from 'unified'
import { reporter } from 'vfile-reporter'
const file = await unified()
.use(remarkParse)
.use(remarkLint)
.use(remarkLintNoEmphasisAsHeading)
.use(remarkStringify)
.process('# Hello\n\n**World**\n\nThis is a paragraph.')
console.error(reporter(file))
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module not supported
Using require() with ESM-only package (v4+).
fixSwitch to import or set type: module in package.json.
TypeError: remarkLintNoEmphasisAsHeading is not a function
Named import attempt: import { remarkLintNoEmphasisAsHeading } from '...'
fixUse default import: import remarkLintNoEmphasisAsHeading from '...'
Audit
Dependencies
unifiedrequiredrequired to integrate with unified processor
remark-lintrequiredrequired as the lint framework