{"id":26262,"library":"remark-lint-no-hr-after-heading","title":"remark-lint-no-hr-after-heading","description":"A remark-lint rule that warns when a horizontal rule (thematic break) appears immediately after a heading. This package is version 1.0.0, released as a stable linting rule for the remark ecosystem. It helps enforce stylistic consistency by discouraging the use of `---` as a heading border. Unlike general heading styles, this rule specifically targets thematic breaks placed after headings. The rule is part of the remark-lint plugin collection and integrates seamlessly with remark's CLI, API, and configuration files.","status":"active","version":"1.0.0","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","remark","lint","rule","hr","thematic","break"],"install":[{"cmd":"npm install remark-lint-no-hr-after-heading","lang":"bash","label":"npm"},{"cmd":"yarn add remark-lint-no-hr-after-heading","lang":"bash","label":"yarn"},{"cmd":"pnpm add remark-lint-no-hr-after-heading","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required to be installed alongside as a base linting plugin","package":"remark-lint","optional":false}],"imports":[{"note":"CommonJS import for Node.js; the package does not export named symbols.","symbol":"default","correct":"const remarkLintNoHrAfterHeading = require('remark-lint-no-hr-after-heading')"},{"note":"This package uses default export, not named export. Named import will result in undefined.","wrong":"import { remarkLintNoHrAfterHeading } from 'remark-lint-no-hr-after-heading'","symbol":"default","correct":"import remarkLintNoHrAfterHeading from 'remark-lint-no-hr-after-heading'"},{"note":"When using with unified/remark, pass the module directly; the plugin is the default export.","wrong":".use(require('remark-lint-no-hr-after-heading').default)","symbol":"plugin","correct":".use(require('remark-lint-no-hr-after-heading'))"}],"quickstart":{"code":"// Example using remark with lint and this rule\nconst remark = require('remark')\nconst lint = require('remark-lint')\nconst noHrAfterHeading = require('remark-lint-no-hr-after-heading')\nconst report = require('vfile-reporter')\n\nremark()\n  .use(lint)\n  .use(noHrAfterHeading)\n  .process('# Hello World\\n---', (err, file) => {\n    console.error(report(err || file))\n  })\n// Output: warning: Don’t use a horizontal line after a heading","lang":"javascript","description":"Demonstrates how to use remark-lint-no-hr-after-heading with remark, including lint and reporter."},"warnings":[{"fix":"Install the correct package: npm install remark-lint-no-hr-after-heading","message":"The package name is 'remark-lint-no-hr-after-heading', but README examples show incorrect install names like 'remark-lint-no-heading-indent' and 'lint-no-hr-after-indent'. Ensure you use the correct package name.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Add remark-lint as a dependency and use it before this rule: .use(lint).use(noHrAfterHeading)","message":"This rule must be used together with the 'remark-lint' base plugin. Using it alone will have no effect.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use require() or if using ESM, use createRequire from 'module'.","message":"The module uses CommonJS exports and may not have ESM compatibility. Using dynamic import may require special handling in ESM environments.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"npm install remark-lint-no-hr-after-heading","cause":"Package not installed","error":"Error: Cannot find module 'remark-lint-no-hr-after-heading'"},{"fix":"Ensure you call .use(lint) before .use(noHrAfterHeading)","cause":"Forgetting to call .use() with lint first","error":"TypeError: remark().use(...) is not a function"},{"fix":"Add remark-lint to your plugins list and use it before this rule","cause":"Using the rule without the remark-lint plugin","error":"Warning: Ignored unknown rule: no-hr-after-heading"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}