remark-lint-no-blockquote-without-marker
raw JSON → 6.0.1 verified Fri May 01 auth: no javascript
A remark-lint rule that warns when blockquote continuation lines lack a `>` marker (lazy lines). Current stable version is 6.0.1, released as part of the remark-lint monorepo. It enforces consistent blockquote style by flagging any line inside a blockquote that does not start with `>`. The rule is included in the `remark-preset-lint-markdown-style-guide` and `remark-preset-lint-recommended` presets. Unlike other lint rules that only check the first line, this catches all lazy lines, making blockquotes unambiguous and easier to read. Zero configuration options — just plug it in. Supports ESM only, with TypeScript types included.
Common errors
error Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/remark-lint-no-blockquote-without-marker/index.js from /path/to/your-file.js not supported. ↓
cause Using CommonJS require() on an ESM-only package (v6+).
fix
Switch to ES import syntax:
import remarkLintNoBlockquoteWithoutMarker from 'remark-lint-no-blockquote-without-marker' error TypeError: remarkLintNoBlockquoteWithoutMarker is not a function ↓
cause Using `require('remark-lint-no-blockquote-without-marker')` which returns a module with default export as `{default: ...}` in some contexts.
fix
Use dynamic import:
const remarkLintNoBlockquoteWithoutMarker = (await import('remark-lint-no-blockquote-without-marker')).default; or switch to static ES imports. Warnings
breaking ESM-only: This package no longer supports CommonJS (require()). ↓
fix Use ES import syntax: `import remarkLintNoBlockquoteWithoutMarker from 'remark-lint-no-blockquote-without-marker'`
deprecated The old `use(remarkLintNoBlockquoteWithoutMarker, ...)` with options is deprecated; this rule has no options. ↓
fix Remove any options object from the `.use()` call.
gotcha The warning message uses unexpected format with backticks: 'Unexpected `{}` block quote markers before paragraph line' — the braces are literal. ↓
fix String interpolation in lint message may confuse parsers; no fix needed, just be aware.
gotcha This rule only works with `remark-parse`; using other parsers (e.g., `remark-gfm`) may not produce the same AST. ↓
fix Ensure `remark-parse` is included in the pipeline before this rule.
Install
npm install remark-lint-no-blockquote-without-marker yarn add remark-lint-no-blockquote-without-marker pnpm add remark-lint-no-blockquote-without-marker Imports
- remarkLintNoBlockquoteWithoutMarker wrong
const remarkLintNoBlockquoteWithoutMarker = require('remark-lint-no-blockquote-without-marker')correctimport remarkLintNoBlockquoteWithoutMarker from 'remark-lint-no-blockquote-without-marker' - remarkLint wrong
import { remarkLint } from 'remark-lint'correctimport remarkLint from 'remark-lint' - unified wrong
import unified from 'unified'correctimport { unified } from 'unified'
Quickstart
import { unified } from 'unified';
import remarkParse from 'remark-parse';
import remarkStringify from 'remark-stringify';
import remarkLint from 'remark-lint';
import remarkLintNoBlockquoteWithoutMarker from 'remark-lint-no-blockquote-without-marker';
import { reporter } from 'vfile-reporter';
const file = await unified()
.use(remarkParse)
.use(remarkLint)
.use(remarkLintNoBlockquoteWithoutMarker)
.use(remarkStringify)
.process('> Mercury,\nVenus,\n> and Earth.');
console.error(reporter(file)); // Shows warning for line 2