remark-lint-no-missing-blank-lines

raw JSON →
4.0.1 verified Fri May 01 auth: no javascript

A remark-lint rule that warns when blank lines are missing between Markdown block-level nodes. Part of the remark ecosystem for linting Markdown, version 4.0.1 is stable and ESM-only since v4. Key differentiators: automated detection of missing blank lines in headings, lists, and blockquotes; supports `exceptTightLists` option to allow omission in tight list items; integrates seamlessly with unified and remark-stringify. Not included in default presets; requires explicit configuration.

error Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'remark-lint-no-missing-blank-lines'
cause Attempting to use require() without .default in ESM-only version
fix
Use import statement or require('...').default
error TypeError: remarkLintNoMissingBlankLines is not a function
cause Using named import instead of default import
fix
Use import remarkLintNoMissingBlankLines from 'remark-lint-no-missing-blank-lines'
breaking ESM-only since v4.0.0; CommonJS require() fails without .default
fix Use ESM import or use require('remark-lint-no-missing-blank-lines').default
deprecated Options type previously exported as 'RemarkLintNoMissingBlankLinesOptions'
fix Use 'Options' import from v4+
gotcha Does not check blank lines inside inline content; only block-level nodes
fix No fix; intended behavior. Use other rules for inline spacing.
npm install remark-lint-no-missing-blank-lines
yarn add remark-lint-no-missing-blank-lines
pnpm add remark-lint-no-missing-blank-lines

Shows ESM usage with unified, parsing, linting for missing blank lines, and reporting.

import remarkLint from 'remark-lint';
import remarkLintNoMissingBlankLines from 'remark-lint-no-missing-blank-lines';
import remarkParse from 'remark-parse';
import remarkStringify from 'remark-stringify';
import { read } from 'to-vfile';
import { unified } from 'unified';
import { reporter } from 'vfile-reporter';

const file = await read('example.md');
await unified()
  .use(remarkParse)
  .use(remarkLint)
  .use(remarkLintNoMissingBlankLines, { exceptTightLists: false })
  .use(remarkStringify)
  .process(file);
console.error(reporter(file));