remark-lint rule to warn when headings are too long. Current stable version is 4.1.1 (ESM-only, requires Node.js 16+). Part of the unified/remark ecosystem, this rule enforces a maximum heading length (default 60 characters) and is included in some presets like remark-preset-lint-markdown-style-guide. Provides an optional stringLength function for custom text measurement (e.g., to count display width). Active development with regular releases coordinated across the remark-lint monorepo.
npm install remark-lint-maximum-heading-lengthNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to use the rule with unified, specifying a custom max heading length of 80 characters.
Use import or dynamic import(). For Node.js <16, upgrade or stay on v3.
Change `.use(remarkLintMaximumHeadingLength, 60)` to `.use(remarkLintMaximumHeadingLength, { size: 60 })`.Use default import: `import remarkLintMaximumHeadingLength from 'remark-lint-maximum-heading-length'`.
Explicitly pass options after the preset.
Change require() to import or use dynamic import().
Use `.use(remarkLintMaximumHeadingLength, { size: 60 })` instead of `.use(remarkLintMaximumHeadingLength, 60)`.