JSPM

remark-lint-no-hr-after-heading

1.0.0
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 86
    • Score
      100M100P100Q75875F
    • License MIT

    remark-lint rule to warn when an hr appears after a heading

    Package Exports

    • remark-lint-no-hr-after-heading

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (remark-lint-no-hr-after-heading) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    remark-lint-no-hr-after-heading

    Warn when a when an horizontal rule appears after a heading. It's a thematic break, not a heading border.

    Example

    ok.md
    In
    # Hello world
    Out

    No messages.

    not-ok.md
    In
    # Hello world
    ---
    Out
      2:1-2:4  warning  Don’t use a horizontal line after a heading  no-hr-after-heading  remark-lint

    Install

    [npm][https://docs.npmjs.com/cli/install]:

    npm install remark-lint-no-heading-indent

    Use

    You probably want to use it on the CLI through a config file:

     …
     "remarkConfig": {
       "plugins": [
         …
         "lint",
    +    "lint-no-hr-after-indent",
         …
       ]
     }
     …

    Or use it on the CLI directly

    remark -u lint -u lint-no-hr-after-indent readme.md

    Or use this on the API:

     var remark = require('remark')
     var report = require('vfile-reporter')
    
     remark()
       .use(require('remark-lint'))
    +  .use(require('lint-no-hr-after-indent'))
       .process('_Emphasis_ and **importance**', function (err, file) {
         console.error(report(err || file))
       })

    License

    [MIT][https://github.com/olizilla/remark-lint-no-hr-after-heading/blob/main/license] © [olizilla][https://github/olizilla]