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

remark-lint-list-item-indent

JSON →
library4.0.1jsnpmunverified

remark-lint rule (v4.0.1) to check whitespace between list item markers (including bullets and ordered list markers) and content. Part of the remark-lint ecosystem. Supports three indentation styles: 'one' (marker + 1 space), 'tab' (marker + spaces to next tab stop), and 'mixed' (tight lists as 'one', loose lists as 'tab'). Ships TypeScript types. Used in presets like remark-preset-lint-recommended (default 'one') and remark-preset-lint-markdown-style-guide (default 'mixed'). ESM-only package; requires Node.js 16+. Minimal alternative to more complex lint rules.

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

remarkLintListItemIndent
import remarkLintListItemIndent from 'remark-lint-list-item-indent'
import { remarkLintListItemIndent } from 'remark-lint-list-item-indent'
Default export, not named. Since v4 ESM-only.
Options
import type { Options } from 'remark-lint-list-item-indent'
TypeScript type import for the options type.
CJS require
const remarkLintListItemIndent = require('remark-lint-list-item-indent')
const { remarkLintListItemIndent } = require('remark-lint-list-item-indent')
CommonJS require is not supported; package is ESM-only since v4. This example is for context only.

Create a unified processor with remark-lint and the list-item-indent rule to check markdown indentation style.

import remarkLint from 'remark-lint'; import remarkLintListItemIndent from 'remark-lint-list-item-indent'; import remarkParse from 'remark-parse'; import { unified } from 'unified'; import { reporter } from 'vfile-reporter'; const file = await unified() .use(remarkParse) .use(remarkLint) .use(remarkLintListItemIndent, 'tab') // enforce 'tab' style .process('* Item\n\n1. Item'); console.error(reporter(file));
Debug
Known issues
breakingPackage is ESM-only; CommonJS require is not supported.
fix
Use import or dynamic import. If you need CJS, use v3.”
affects: >=4
gotchaThe rule is only a warning; it does not auto-fix. Use remark-stringify with appropriate settings for fixing.
fix
Consider using remark-stringify with listItemIndent option.
affects: >=0
deprecatedThe 'mixed' option may be deprecated in future versions.
fix
Prefer 'one' or 'tab' explicitly.
affects: >=4
Errors
Common errors & fixes
require() of ES Module
Using CJS require with an ESM-only package
fix
Use import or switch to dynamic import.
TypeError: (0 , remark_lint_list_item_indent_default) is not a function
Imported as named export instead of default
fix
Use default import: import remarkLintListItemIndent from 'remark-lint-list-item-indent'
Cannot find module 'remark-lint'
Missing peer dependency remark-lint
fix
npm install remark-lint
Upgrade
Version history
4.0.1latest on npm
Audit
Dependencies
remark-lintrequiredPeer dependency providing the lint framework
unifiedoptionalRequired as part of the remark ecosystem but not a direct dependency
Agent activity
4 hits · last 30 days
node
4
Resources
remark-lint-list-item-indent — npm install remark-lint-list-item-indent · libregistry