A remark-lint rule that warns when Markdown headings violate a specified or consistent style (ATX, ATX-closed, or setext). Version 4.0.1 is the latest stable release, part of the remark-lint ecosystem. It is ESM-only (Node 16+). Unlike alternatives like markdownlint, it integrates seamlessly with unified and remark, allowing programmatic linting and fixes. It supports automatic style detection (consistent) and explicit configuration. The package ships TypeScript types and is commonly used in presets like remark-preset-lint-consistent and remark-preset-lint-markdown-style-guide.
npm install remark-lint-heading-styleNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates unified pipeline to parse, lint headings for ATX style, and output warnings using vfile-reporter.
Switch to ES modules: use 'import' instead of 'require()'. Set type: 'module' in package.json or use .mjs extension.
Use explicit style like 'atx' or 'setext' to be safe.
Ensure the markdown structure is flat or test edge cases; consider using remark-lint with other plugins.
Use dynamic import() or switch to ES modules. Set 'type': 'module' in package.json.
Use: import remarkLintHeadingStyle from 'remark-lint-heading-style'
Install remark-lint alongside: npm install remark-lint remark-lint-heading-style