Registry /
testing / remark-lint-no-consecutive-blank-lines
Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
remarkLintNoConsecutiveBlankLines
✓ import remarkLintNoConsecutiveBlankLines from 'remark-lint-no-consecutive-blank-lines'
✗ const remarkLintNoConsecutiveBlankLines = require('remark-lint-no-consecutive-blank-lines')
This package is ESM-only. CommonJS require() is not supported.
remarkLintNoConsecutiveBlankLines
✓ import remarkLintNoConsecutiveBlankLines from 'remark-lint-no-consecutive-blank-lines'
✗ import { remarkLintNoConsecutiveBlankLines } from 'remark-lint-no-consecutive-blank-lines'
The package exports a single default export, not a named export.
Type definitions
✓ // No explicit type import needed; types are shiped with the package
✗ import type { Options } from 'remark-lint-no-consecutive-blank-lines'
This rule has no options, so there is no Options type to import.
Shows how to import and use the remark-lint rule to detect too many consecutive blank lines.
import remarkLint from 'remark-lint';
import remarkLintNoConsecutiveBlankLines from 'remark-lint-no-consecutive-blank-lines';
import remarkParse from 'remark-parse';
import remarkStringify from 'remark-stringify';
import { unified } from 'unified';
import { reporter } from 'vfile-reporter';
const file = await unified()
.use(remarkParse)
.use(remarkLint)
.use(remarkLintNoConsecutiveBlankLines)
.use(remarkStringify)
.process('# Hello\n\n\nWorld'); // Three blank lines after heading
console.error(reporter(file));
// Output:
// 4:1: Unexpected `2` blank lines before node, expected up to `1` blank line, remove `1` blank line
Errors
Common errors & fixes
require() of ES Module /path/to/node_modules/remark-lint-no-consecutive-blank-lines/index.js from /path/to/file.js not supported.
Using CommonJS require() on an ESM-only package.
fixChange to import statement or set "type": "module" in package.json.
Error: Cannot find module 'remark-lint-no-consecutive-blank-lines'
Package not installed or not in node_modules.
fixRun npm install remark-lint-no-consecutive-blank-lines.
TypeError: remarkLintNoConsecutiveBlankLines is not a function
Importing as named export instead of default export.
fixUse import remarkLintNoConsecutiveBlankLines from 'remark-lint-no-consecutive-blank-lines' (no curly braces).
Audit
Dependencies
unifiedrequiredRemarkLintNoConsecutiveBlankLines is a unified plugin (Transformer).
remark-lintrequiredThe rule is used as part of remark-lint; remark-lint must be included in the unified pipeline.