A remark-lint rule that warns when a markdown section heading has no content before the next heading of the same or higher level. This package (v4.0.0) is part of the remark-lint ecosystem and is specifically designed for enforcing formatting guidelines in free-programming-books. It is released on demand, with no fixed cadence. Unlike generic lint rules, it targets empty sections, which can occur when headings are split incorrectly or content is missing. It integrates seamlessly with remark-cli.
npm install remark-lint-no-empty-sectionsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to use the plugin programmatically with ESM imports, including an example that triggers a warning.
Switch to ESM imports or use dynamic import() if needed.
Install @types/remark-lint and create a .d.ts file for this plugin.
Use additional lint rules (e.g., remark-lint-no-heading-punctuation) to catch other empty issues.
Change to import statement: import remarkLintNoEmptySections from 'remark-lint-no-empty-sections';
Ensure you call .use() before .process(): remark().use(remarkLint).use(remarkLintNoEmptySections).process(markdown)