remark-lint-no-paragraph-content-indent

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

remark-lint rule to warn when text in paragraphs is indented. Current stable version: 5.0.1 (ESM only, Node.js 16+). Part of the remark-lint monorepo; release cadence follows the monorepo (patch releases for all packages). Key differentiator: catches indentation in paragraph content which has no effect on rendering, helping maintain consistent markdown style. This rule has no options and is not included in any preset, so it must be explicitly added.

error Error: Cannot find module 'remark-lint-no-paragraph-content-indent'
cause Package not installed or old Node.js without ESM support
fix
npm install remark-lint-no-paragraph-content-indent and ensure Node.js >= 16
error TypeError: remarkLintNoParagraphContentIndent is not a function
cause Using default import incorrectly (e.g., importing wrong symbol)
fix
Use: import remarkLintNoParagraphContentIndent from 'remark-lint-no-paragraph-content-indent'
error Unexpected '1' extra space before content line, remove '1' space
cause Paragraph continuation line indented by one or more spaces
fix
Remove the leading spaces from the continuation line of the paragraph.
breaking Package is ESM-only starting from version 5.0.0. require() will not work.
fix Use import syntax. If using CommonJS, either stay on version 4.x or use dynamic import.
gotcha This rule does not fire on blocks inside list items or blockquotes because those indents are meaningful.
fix Test your markdown comprehensively; the rule only applies to indentation of continuation lines in the same paragraph.
deprecated Some older versions relied on remark-lint being loaded first. This is still required.
fix Always .use(remarkLint) before this rule. Not an issue in recent versions but good practice.
npm install remark-lint-no-paragraph-content-indent
yarn add remark-lint-no-paragraph-content-indent
pnpm add remark-lint-no-paragraph-content-indent

Shows how to use the rule with unified API, including required imports and processing a markdown file.

import remarkLint from 'remark-lint'
import remarkLintNoParagraphContentIndent from 'remark-lint-no-paragraph-content-indent'
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(remarkLintNoParagraphContentIndent)
  .use(remarkStringify)
  .process(file)

console.error(reporter(file))