remark-lint-list-item-spacing
Advanced tools
Comparing version 2.0.1 to 3.0.0
20
index.js
@@ -15,8 +15,8 @@ /** | ||
* | ||
* By default, all items must be “loose” (a blank line must be between them) | ||
* if one or more items are multiline (span more than one line). | ||
* By default, all items must be spread out (a blank line must be between | ||
* them) if one or more items are multiline (span more than one line). | ||
* Otherwise, the list must be tight (no blank line must be between items). | ||
* | ||
* If you pass `{checkBlanks: true}`, all items must be “loose” if one or more | ||
* items contain blank lines. | ||
* If you pass `{checkBlanks: true}`, all items must be spread out if one or | ||
* more items contain blank lines. | ||
* Otherwise, the list must be tight. | ||
@@ -62,4 +62,4 @@ * | ||
* 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 | ||
* 10:11-12:1: Extraneous new line after list item | ||
* 12:11-14:1: Extraneous new line after list item | ||
* | ||
@@ -109,3 +109,3 @@ * @example {"name": "ok.md", "setting": {"checkBlanks": true}} | ||
* 8:18-9:1: Missing new line after list item | ||
* 15:1-16:1: Extraneous new line after list item | ||
* 14:15-16:1: Extraneous new line after list item | ||
*/ | ||
@@ -138,3 +138,2 @@ | ||
var tight = true | ||
var indent | ||
var children | ||
@@ -158,5 +157,4 @@ var length | ||
indent = start(node).column | ||
child = children[0] | ||
index = 0 | ||
index = 0 // Skip over first. | ||
@@ -166,3 +164,3 @@ while (++index < length) { | ||
if (end(child).column > indent !== tight) { | ||
if (start(next).line - end(child).line < 2 !== tight) { | ||
file.message(tight ? reasonTight : reasonLoose, { | ||
@@ -169,0 +167,0 @@ start: end(child), |
{ | ||
"name": "remark-lint-list-item-spacing", | ||
"version": "2.0.1", | ||
"version": "3.0.0", | ||
"description": "remark-lint rule to warn when list looseness is incorrect", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -21,8 +21,8 @@ <!--This file is generated--> | ||
By default, all items must be “loose” (a blank line must be between them) | ||
if one or more items are multiline (span more than one line). | ||
By default, all items must be spread out (a blank line must be between | ||
them) if one or more items are multiline (span more than one line). | ||
Otherwise, the list must be tight (no blank line must be between items). | ||
If you pass `{checkBlanks: true}`, all items must be “loose” if one or more | ||
items contain blank lines. | ||
If you pass `{checkBlanks: true}`, all items must be spread out if one or | ||
more items contain blank lines. | ||
Otherwise, the list must be tight. | ||
@@ -91,4 +91,4 @@ | ||
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 | ||
10:11-12:1: Extraneous new line after list item | ||
12:11-14:1: Extraneous new line after list item | ||
``` | ||
@@ -156,3 +156,3 @@ | ||
8:18-9:1: Missing new line after list item | ||
15:1-16:1: Extraneous new line after list item | ||
14:15-16:1: Extraneous new line after list item | ||
``` | ||
@@ -241,5 +241,5 @@ | ||
[chat-badge]: https://img.shields.io/badge/chat-spectrum.svg | ||
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg | ||
[chat]: https://spectrum.chat/unified/remark | ||
[chat]: https://github.com/remarkjs/remark/discussions | ||
@@ -246,0 +246,0 @@ [npm]: https://docs.npmjs.com/cli/install |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10141
176