Observed since 20 Oct, 22:38 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
textlint rule which detects horizontal rules appearing immediately before headings.
textlint rule which detects and reports horizontal rules appearing immediately before headings in your markdown document.
While horizontal rules (---, ***, ___) before headings are syntactically valid in Markdown, they often create visual clutter. Markdown headings already provide clear visual separation, making horizontal rules redundant in this context.
Install with pnpm:
pnpm add @0x6b/textlint-rule-no-hr-before-heading
Or with npm:
npm install @0x6b/textlint-rule-no-hr-before-heading
This module requires Node.js >= 20.0.0.
Via .textlintrc(recommended):
{
"rules": {
"@0x6b/no-hr-before-heading": true
}
}
Via CLI:
textlint --rule @0x6b/no-hr-before-heading README.md
---
# Heading
Some content
___
## Another Heading
# Heading
Some content
---
More content
## Another Heading
This rule is automatically fixable using the --fix option. The horizontal rule and any whitespace between it and the heading will be removed.
This rule correctly handles YAML front matter in Markdown files. Front matter delimiters (---) are not treated as horizontal rules when properly formatted:
---
title: My Document
date: 2023-01-01
---
# Heading
This is valid and will not trigger the rule because textlint's markdown parser includes remark-frontmatter support by default, which correctly parses front matter as a special node type rather than as horizontal rules.
Builds source codes for publish to the lib/ folder.
pnpm install && pnpm run build
Run test code in test folder by textlint-tester.
pnpm test
MIT © 0x6b
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.0Registry latest | 6 Nov 2025 | 9 |
This describes our collected data; it is not a security assessment.
Shared repository data · GitHub
Observed since 20 Oct, 22:38 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:6f656de81d46595401d5a13b2a935af2372224707275bf93746e6c65743e2c75