Registry / testing / remark-lint-blockquote-indentation

remark-lint-blockquote-indentation

JSON →
library4.0.1jsnpmunverified

A remark-lint rule that warns when block quotes are indented too much or too little, checking the `>` marker and the spaces before content. The `remark-lint` ecosystem provides over 100 rules for linting Markdown. Current stable version 4.0.1 (ESM-only, requires Node.js 16+). Part of the unified/remark ecosystem, maintained by the remark team. Key differentiator: deeply integrated with remark-lint presets like `remark-preset-lint-consistent` and `remark-preset-lint-markdown-style-guide`.

npm install remark-lint-blockquote-indentation
INSTALL
IMPORT
SIG · REMARK-LINT-BLOCKQ
R
remark-lint-blockquote-indentation
testingjavascriptv4.0.1
harness data pending
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.

remarkLintBlockquoteIndentation
import remarkLintBlockquoteIndentation from 'remark-lint-blockquote-indentation'
const remarkLintBlockquoteIndentation = require('remark-lint-blockquote-indentation')
ESM-only since v4; default export is the plugin function.
Options
import type { Options } from 'remark-lint-blockquote-indentation'
import { Options } from 'remark-lint-blockquote-indentation'
Options is a TypeScript type only, not a runtime value. Use `import type`.

Shows how to apply the rule with a specific indentation option (2 spaces) and report lint warnings.

import remarkLint from 'remark-lint' import remarkLintBlockquoteIndentation from 'remark-lint-blockquote-indentation' 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(remarkLintBlockquoteIndentation, 2) // enforce 2 spaces after `>` .use(remarkStringify) .process(file) console.error(reporter(file))
Debug
Known issues
breakingPackage is ESM-only since v4. Required Node.js 16+.
fix
Use `import` syntax instead of `require()`, or switch to v3.x if you need CommonJS.
affects: >=4.0.0
gotchaOptions type is `number | 'consistent'`. Setting a number like `2` means exactly that many spaces after `>`. `'consistent'` detects the first blockquote's indent and warns on deviations.
fix
Ensure you pass either a number or the string 'consistent' (not a boolean or other string).
affects: >=1.0.0
gotchaThe rule does **not** check the number of `>` markers themselves (nested blockquotes). It only checks whitespace after the *last* `>` marker.
fix
Understand that the rule only validates spacing after the final `>` marker, not the nesting depth.
affects: >=1.0.0
deprecatedThe `remark-lint` preset packages may be deprecated or have different default options. Check preset documentation.
fix
Consult preset docs for recommended options; this rule's preset options are noted in the README.
affects: >=4.0.0
Errors
Common errors & fixes
Cannot find module 'remark-lint-blockquote-indentation'
Package not installed or ESM-only file required with `require()`.
fix
Run `npm install remark-lint-blockquote-indentation` and use `import` syntax (Node 16+).
Error: [object Object] is not a plugin
Passing the import incorrectly (e.g., destructuring default export).
fix
Use default import: `import remarkLintBlockquoteIndentation from 'remark-lint-blockquote-indentation'`.
TypeError: plugin is not a function
Using the plugin without `remark-lint` being set up first.
fix
Ensure you call `.use(remarkLint)` before `.use(remarkLintBlockquoteIndentation)` in the unified pipeline.
Upgrade
Version history
4.0.1latest on npm
Audit
Dependencies
unified-lint-ruleoptionalCore remark-lint infrastructure for creating lint rules
remark-lintoptionalRequired to actually apply lint rules via remark
Agent activity
4 hits · last 30 days
node
4
Resources
remark-lint-blockquote-indentation — npm install remark-lint-blockquote-indentation · libregistry