Registry / testing / remark-lint-list-item-content-indent

remark-lint-list-item-content-indent

JSON →
library4.0.1jsnpmunverified

remark-lint rule (v4.0.1, latest) that warns when list item content has inconsistent indentation. It checks the first child of each list item and flags subsequent children that do not align with it. This is part of the remark-lint ecosystem, ESM-only, ships TypeScript types. Key differentiator: it catches mixed indentation in multi-line list items, helping maintain consistent Markdown formatting. Compatible with Node.js 16+ and modern browsers via esm.sh.

npm install remark-lint-list-item-content-indent
INSTALL
IMPORT
SIG · REMARK-LINT-LIST-I
R
remark-lint-list-item-content-indent
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.

remarkLintListItemContentIndent
import remarkLintListItemContentIndent from 'remark-lint-list-item-content-indent'
const remarkLintListItemContentIndent = require('remark-lint-list-item-content-indent')
ESM-only since v4. CommonJS require will fail
remarkLint
import remarkLint from 'remark-lint'
import { remarkLint } from 'remark-lint'
Default export, not named
unified
import { unified } from 'unified'
Default export in earlier versions, named export since unified@11

Shows how to use the rule programmatically with unified: parse Markdown, lint for list item content indent issues, stringify back, and report messages.

import remarkLint from 'remark-lint' import remarkLintListItemContentIndent from 'remark-lint-list-item-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(remarkLintListItemContentIndent) .use(remarkStringify) .process(file) console.error(reporter(file))
remark --version
Debug
Known issues
breakingPackage is ESM-only since v4. Requiring with require() throws an error.
fix
Use import or dynamic import(). For CommonJS projects, use a bundler or stay on v3.
affects: >=4.0.0
deprecatedIn v3, the rule was called 'remark-lint-list-item-content-indent' but the exported function name was 'listItemContentIndent'. In v4, the export is 'remarkLintListItemContentIndent'.
fix
Update import to match new export name: import remarkLintListItemContentIndent from 'remark-lint-list-item-content-indent'
affects: >=3.0.0 <4.0.0
gotchaUnlike some lint rules, this rule has no configuration options. It always checks consistent indentation, which may be too strict for some projects.
fix
If you need different behavior, consider a custom rule or disabling this rule and using another method.
affects: *
Errors
Common errors & fixes
Cannot find module 'remark-lint-list-item-content-indent'
Package is not installed or typo in package name
fix
npm install remark-lint-list-item-content-indent
ERR_REQUIRE_ESM
Using require() to import an ESM-only package in v4+
fix
Use import instead, or set type:"module" in package.json
remark-lint-list-item-content-indent is not a function
Wrong import style: using named import instead of default import
fix
Use default import: import remarkLintListItemContentIndent from 'remark-lint-list-item-content-indent'
Upgrade
Version history
4.0.1latest on npm
Audit
Dependencies
unifiedrequiredUnified ecosystem required for linting
remark-lintrequiredCore linting plugin that this rule extends
remark-parserequiredParse Markdown into AST for linting
remark-stringifyoptionalSerialize back after linting (optional for linting alone)
Agent activity
4 hits · last 30 days
node
4
Resources
remark-lint-list-item-content-indent — npm install remark-lint-list-item-content-indent · libregistry