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

remark-lint-list-item-style

JSON →
library3.0.1jsnpmunverified

A remark-lint rule that warns when list items violate a given capitalization or punctuation style. Version 3.0.1 is the current stable release, part of the unified-utils monorepo with active maintenance. It picks up where the abandoned remark-lint-list-item-punctuation left off, offering full unicode support and configurable options for checking first-letter capitalization, punctuation, and paragraph spread. Requires Node.js >=20.18.0 and is ESM-only. It is used with remark-lint to enforce consistent list item styling across Markdown documents.

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

remarkLintListItemStyle
import remarkLintListItemStyle from 'remark-lint-list-item-style'
const remarkLintListItemStyle = require('remark-lint-list-item-style')
ESM-only since v3.0.0; cannot be require'd. Default import provides the plugin function.
remarkLintListItemStyle (in .remarkrc.mjs)
import remarkLintListItemStyle from 'remark-lint-list-item-style'; export default { plugins: [remarkLintListItemStyle] }
module.exports = { plugins: ['remark-lint-list-item-style'] }
In ESM config files, import the default export and use it as a function, not a string.
remarkLintListItemStyle (in CLI)
remark --use remark-lint --use lint-list-item-style README.md
remark --use remark-lint --use remark-lint-list-item-style README.md
The CLI plugin name is 'lint-list-item-style' (not 'remark-lint-list-item-style').

Shows how to use the plugin with remark to lint list items for punctuation, capitalization, and paragraph spread.

import { read } from 'to-vfile'; import { reporter } from 'vfile-reporter'; import { remark } from 'remark'; import remarkLint from 'remark-lint'; import remarkLintListItemStyle from 'remark-lint-list-item-style'; const file = await remark() .use(remarkLint) .use(remarkLintListItemStyle, { punctuation: '.', firstWord: true, spread: 'each' }) .process(await read('example.md')); console.log(reporter(file));
Debug
Known issues
breakingMinimum supported Node.js version is now 20.18.0. Older versions are no longer supported.
fix
Upgrade Node.js to >=20.18.0.
affects: >=3.0.0
breakingPackage is now ESM-only since v3.0.0. Using CommonJS require() will fail with ERR_REQUIRE_ESM.
fix
Use import syntax instead of require(). If using CommonJS, consider dynamic import().
affects: >=3.0.0
deprecatedThe option 'firstWord' has been renamed to 'capitalize' in some related packages; check docs for compatibility.
fix
Use 'firstWord' as documented for this version; future versions may adopt 'capitalize'.
affects: >=3.0.0
gotchaThe CLI plugin name is 'lint-list-item-style', not 'remark-lint-list-item-style'. Using the full name will not be recognized.
fix
Use '--use lint-list-item-style' in remark-cli.
affects: *
gotchaThe rule checks the first letter of bold, italic, and struck-through items correctly only since v3.0.1. Prior versions may miss these cases.
fix
Upgrade to v3.0.1 or later to fix detection for formatted list items.
affects: <3.0.1
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module
Using CommonJS require() on an ESM-only package (v3.0.0+).
fix
Switch to import syntax or use dynamic import: const mod = await import('remark-lint-list-item-style')
Cannot find module 'remark-lint-list-item-style'
Plugin name used incorrectly in remark-cli or config.
fix
In CLI, use 'lint-list-item-style'. In .remarkrc, use 'remark-lint-list-item-style' as a string or import.
TypeError: remarkLintListItemStyle is not a function
Importing the wrong symbol. The package exports a default function, not a named export.
fix
Use default import: import remarkLintListItemStyle from 'remark-lint-list-item-style'
Upgrade
Version history
3.0.1latest on npm
Audit
Dependencies
unified-lint-rulerequiredCore dependency for defining remark-lint rules
remark-lintrequiredPeer dependency required to register lint messages
Agent activity
4 hits · last 30 days
node
4
Resources
remark-lint-list-item-style — npm install remark-lint-list-item-style · libregistry