A remark-lint rule that warns when heading levels increase by more than one level at a time (e.g., from h1 to h3). This helps enforce accessible heading hierarchies as recommended by HTML accessibility guidelines, where headings should increment by one level. Part of the remark-lint ecosystem, current stable version is 4.0.1 (ESM-only since v2, ships TypeScript types). Released as part of the remark-lint monorepo with regular updates. No options needed. Integrates with remark-lint presets like remark-preset-lint-markdown-style-guide.
npm install remark-lint-heading-incrementNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to use remark-lint-heading-increment to lint a Markdown file for heading level jumps, outputting any warnings.
Use import or dynamic import() instead of require().
Remove any 'style' option; this rule now has no options.
Do not add the rule manually if the preset is used; check preset documentation.
If using TypeScript, ensure your project uses @import syntax and upgrade remark-lint types if needed.
Combine with other lint rules if needed to enforce consistent structure.
Insert an h2 heading between the h1 and h3, or adjust heading levels to increment by one.
Use `import remarkLintHeadingIncrement from 'remark-lint-heading-increment'` or set `"type": "module"` in package.json.
Ensure `remark-lint`, `unified`, `remark-parse`, etc. are installed. Check that the import path is exactly `'remark-lint-heading-increment'`.