remark-lint-no-consecutive-blank-lines
Advanced tools
Comparing version 4.1.0 to 4.1.1
@@ -5,9 +5,9 @@ export default remarkLintNoConsecutiveBlankLines | ||
declare const remarkLintNoConsecutiveBlankLines: import('unified').Plugin< | ||
| void[] | ||
| [unknown] | ||
| void[] | ||
| [ | ||
( | ||
| boolean | ||
| import('unified-lint-rule').Label | ||
| import('unified-lint-rule').Severity | ||
| import('unified-lint-rule').Label | ||
), | ||
@@ -14,0 +14,0 @@ unknown |
14
index.js
@@ -58,2 +58,4 @@ /** | ||
const unknownContainerSize = new Set(['mdxJsxFlowElement', 'mdxJsxTextElement']) | ||
const remarkLintNoConsecutiveBlankLines = lintRule( | ||
@@ -71,4 +73,6 @@ { | ||
if (head && !generated(head)) { | ||
// Compare parent and first child. | ||
compare(pointStart(node), pointStart(head), 0) | ||
if (!unknownContainerSize.has(node.type)) { | ||
// Compare parent and first child. | ||
compare(pointStart(node), pointStart(head), 0) | ||
} | ||
@@ -90,3 +94,7 @@ // Compare between each child. | ||
// Compare parent and last child. | ||
if (tail !== head && !generated(tail)) { | ||
if ( | ||
tail !== head && | ||
!generated(tail) && | ||
!unknownContainerSize.has(node.type) | ||
) { | ||
compare(pointEnd(node), pointEnd(tail), 1) | ||
@@ -93,0 +101,0 @@ } |
{ | ||
"name": "remark-lint-no-consecutive-blank-lines", | ||
"version": "4.1.0", | ||
"version": "4.1.1", | ||
"description": "remark-lint rule to warn for too many consecutive blank lines", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
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
9570
135