{"id":26247,"library":"remark-lint-no-emphasis-as-heading","title":"remark-lint-no-emphasis-as-heading","description":"remark-lint rule to warn when emphasis or strong is used instead of a heading. Current stable version: 4.0.1. Part of the remark-lint ecosystem, released as needed with other lint rules. Differentiator: specifically targets faux headings created with emphasis/strong, promoting proper heading usage. ESM-only, ships TypeScript types.","status":"active","version":"4.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/remarkjs/remark-lint#main","tags":["javascript","emphasis","heading","lint","remark","remark-lint","remark-lint-rule","rule","typescript"],"install":[{"cmd":"npm install remark-lint-no-emphasis-as-heading","lang":"bash","label":"npm"},{"cmd":"yarn add remark-lint-no-emphasis-as-heading","lang":"bash","label":"yarn"},{"cmd":"pnpm add remark-lint-no-emphasis-as-heading","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"required to integrate with unified processor","package":"unified","optional":false},{"reason":"required as the lint framework","package":"remark-lint","optional":false}],"imports":[{"note":"Default export only; named import will fail. ESM-only since v4.","wrong":"import { remarkLintNoEmphasisAsHeading } from 'remark-lint-no-emphasis-as-heading'","symbol":"remarkLintNoEmphasisAsHeading","correct":"import remarkLintNoEmphasisAsHeading from 'remark-lint-no-emphasis-as-heading'"},{"note":"remark-lint also uses default export.","wrong":"import { remarkLint } from 'remark-lint'","symbol":"remarkLint","correct":"import remarkLint from 'remark-lint'"},{"note":"unified uses named export.","wrong":"import unified from 'unified'","symbol":"unified","correct":"import { unified } from 'unified'"}],"quickstart":{"code":"import remarkLint from 'remark-lint'\nimport remarkLintNoEmphasisAsHeading from 'remark-lint-no-emphasis-as-heading'\nimport remarkParse from 'remark-parse'\nimport remarkStringify from 'remark-stringify'\nimport { unified } from 'unified'\nimport { reporter } from 'vfile-reporter'\n\nconst file = await unified()\n  .use(remarkParse)\n  .use(remarkLint)\n  .use(remarkLintNoEmphasisAsHeading)\n  .use(remarkStringify)\n  .process('# Hello\\n\\n**World**\\n\\nThis is a paragraph.')\n\nconsole.error(reporter(file))","lang":"typescript","description":"Sets up unified with remark-lint and the no-emphasis-as-heading rule, processes a markdown file, and reports lint messages."},"warnings":[{"fix":"Use import or dynamic import() instead of require().","message":"Package is ESM-only since v4; require() will throw ERR_REQUIRE_ESM","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Use default import syntax.","message":"Default export only: import remarkLintNoEmphasisAsHeading from 'remark-lint-no-emphasis-as-heading' (not a named export)","severity":"gotcha","affected_versions":">=4.0.0"},{"fix":"Ensure .use(remarkLint) precedes .use(remarkLintNoEmphasisAsHeading).","message":"The rule must be used after remark-lint plugin; order matters","severity":"gotcha","affected_versions":">=3.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Switch to import or set type: module in package.json.","cause":"Using require() with ESM-only package (v4+).","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module not supported"},{"fix":"Use default import: import remarkLintNoEmphasisAsHeading from '...'","cause":"Named import attempt: import { remarkLintNoEmphasisAsHeading } from '...'","error":"TypeError: remarkLintNoEmphasisAsHeading is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}