Registry / testing / remark-lint-unordered-list-marker-style

remark-lint-unordered-list-marker-style

JSON →
library4.0.1jsnpmunverified

remark-lint rule to enforce consistent unordered list marker styles (asterisk, plus, or hyphen) in Markdown. Current stable version 4.0.1, part of the remark-lint ecosystem for linting Markdown. Ships TypeScript types. Defaults to 'consistent' (first style detected), but can be set to '*', '+', or '-'. Integrates with remark-stringify for auto-fixing. ESM-only since v4, requires Node.js 16+. Differentiators: part of the unified collective, highly configurable, and recommended by markdown style guides.

npm install remark-lint-unordered-list-marker-style
INSTALL
IMPORT
SIG · REMARK-LINT-UNORDE
R
remark-lint-unordered-list-marker-style
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.

remarkLintUnorderedListMarkerStyle
import remarkLintUnorderedListMarkerStyle from 'remark-lint-unordered-list-marker-style'
const remarkLintUnorderedListMarkerStyle = require('remark-lint-unordered-list-marker-style')
ESM-only since v4; CommonJS require() will fail. This is the default export.
Options
import type { Options } from 'remark-lint-unordered-list-marker-style'
import { Options } from 'remark-lint-unordered-list-marker-style'
Options is a TypeScript type; use type import to avoid runtime errors.
Style
import type { Style } from 'remark-lint-unordered-list-marker-style'
import { Style } from 'remark-lint-unordered-list-marker-style'
Style is a TypeScript type; use type import to avoid runtime errors.

Lints an MD file enforcing asterisk markers for unordered lists, reporting any violations.

import { unified } from 'unified' import remarkParse from 'remark-parse' import remarkLint from 'remark-lint' import remarkStringify from 'remark-stringify' import remarkLintUnorderedListMarkerStyle from 'remark-lint-unordered-list-marker-style' import { reporter } from 'vfile-reporter' import { read } from 'to-vfile' const file = await unified() .use(remarkParse) .use(remarkLint) .use(remarkLintUnorderedListMarkerStyle, '*') // enforce asterisk markers .use(remarkStringify) .process(await read('example.md')) console.error(reporter(file))
Debug
Known issues
breakingPackage is ESM-only since v4. Using require() will throw 'ERR_REQUIRE_ESM'.
fix
Switch to import syntax and ensure Node.js 16+.
affects: >=4.0.0
breakingMinimum Node.js version bumped to 16+ in v4.
fix
Update Node.js to 16 or later.
affects: >=4.0.0
gotchaThe rule does not auto-fix; use remark-stringify configuration to set bullet style.
fix
Add bullet option to remark-stringify: .use(remarkStringify, { bullet: '*' })
affects: >=3.0.0
deprecatedOption 'consistent' behaves differently: it uses the first marker found, not a global style.
fix
Explicitly set intended style to avoid ambiguity.
affects: >=1.0.0
Errors
Common errors & fixes
ERR_REQUIRE_ESM
Using CommonJS require() on this ESM-only package.
fix
Change to import statement: import remarkLintUnorderedListMarkerStyle from 'remark-lint-unordered-list-marker-style'
Error: Cannot find module 'remark-lint'
Missing peer dependency remark-lint.
fix
npm install remark-lint
TypeError: options is not iterable
Passing invalid options type (e.g., array instead of string).
fix
Ensure options is one of: '*', '+', '-', or 'consistent'. Example: .use(remarkLintUnorderedListMarkerStyle, '*')
Upgrade
Version history
4.0.1latest on npm
Audit
Dependencies
remark-lintrequiredPeer dependency: remark-lint is required to enable the linting framework; this rule runs as a plugin within it.
unifiedrequiredUnified is the underlying processing chain; the rule is a unified plugin.
remark-parseoptionalRequired for parsing Markdown into AST; needed when using the API programmatically.
remark-stringifyoptionalRequired for stringifying Markdown; used to apply fixes or output the processed file.
Agent activity
4 hits · last 30 days
node
4
Resources
remark-lint-unordered-list-marker-style — npm install remark-lint-unordered-list-marker-style · libregistry