3.0.0 • Published 8 years ago
@freeletics/remark-lint-blank-lines v3.0.0
remark-lint-blank-lines
Warn when number of lines between elements is not correct.
This remark-lint plugin lets you control the number of lines allowed between elements such as list, heading.
List items spacing (loose and tight) should be checked with remark-lint-list-item-spacing plugin.
Options: string, with {a, b} separated by -, default: 1-1.
This rule ensures that a file has:
aempty lines between heading & next elementbempty lines between list & next element
Install
$ npm install --save remark-lint-blank-linesExample
When this rule is '1-1', the following file valid.md is ok:
* [An Awesome Book](http://example.com/example.html)
### Example
* [Another Awesome Book](http://example.com/book.html)
* [Some Other Book](http://example.com/other.html)When this rule is '1-1', the following file invalid.md is not ok:
* [An Awesome Book](http://example.com/example.html)
### Example
* [Another Awesome Book](http://example.com/book.html)
* [Some Other Book](http://example.com/other.html)1:1-1:53: Incorrect number of blank lines between list and next element'
3:1-3:12: Incorrect number of blank lines between heading and next elementUsing the rule
Via .remarkrc
npm install -g remark-cli
npm install remark-lint @freeletics/remark-lint-blank-linesThen, set up your .remarkrc:
{
"plugins": [
"lint",
"lint-blank-lines"
]
}or with custom option:
{
"plugins": [
"lint",
["lint-blank-lines", "1-2"]
]
}Now you can use the following command to run the lint:
remark xxx.mdVia CLI
npm install -g remark-cli
npm install remark-lint @freeletics/remark-lint-blank-lines
remark -u lint -u @freeletics/lint-blank-linesAcknowledgment
This plugin is a fork from remark-lint-blank-lines-1-0-2.
3.0.0
8 years ago