Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/olizilla/remark-lint-no-hr-after-heading
remark-lint rule to warn when an hr appears after a heading
https://github.com/olizilla/remark-lint-no-hr-after-heading
Last synced: 24 days ago
JSON representation
remark-lint rule to warn when an hr appears after a heading
- Host: GitHub
- URL: https://github.com/olizilla/remark-lint-no-hr-after-heading
- Owner: olizilla
- License: mit
- Created: 2020-08-25T14:37:54.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-08-25T14:44:14.000Z (over 4 years ago)
- Last Synced: 2024-10-08T00:25:30.412Z (3 months ago)
- Language: JavaScript
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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
```markdown
# Hello world
```###### Out
No messages.
##### `not-ok.md`
###### In
```markdown
# Hello world
---
```###### Out
```text
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]:
```sh
npm install remark-lint-no-heading-indent
```## Use
You probably want to use it on the CLI through a config file:
```diff
…
"remarkConfig": {
"plugins": [
…
"lint",
+ "lint-no-hr-after-indent",
…
]
}
…
```Or use it on the CLI directly
```sh
remark -u lint -u lint-no-hr-after-indent readme.md
```Or use this on the API:
```diff
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]