Warn when list looseness is incorrect, such as being tight
when it should be loose, and vice versa.
According to the markdown-style-guide,
if one or more list-items in a list spans more than one line,
the list is required to have blank lines between each item.
And otherwise, there should not be blank lines between items.
Install
npm install --save remark-lint-list-item-spacing
Example
When this rule is turned on, the following file
valid.md
is ok:
A tight list:
- item 1
- item 2
- item 3
A loose list:
- Wrapped
item
- item 2
- item 3
When this rule is turned on, the following file
invalid.md
is not ok:
A tight list:
- Wrapped
item
- item 2
- item 3
A loose list:
- item 1
- item 2
- item 3
4:9-5:1: Missing new line after list item
5:11-6:1: Missing new line after list item
11:1-12:1: Extraneous new line after list item
13:1-14:1: Extraneous new line after list item
License
MIT © Titus Wormer