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

remark-lint-ordered-list-marker-style

JSON →
library4.0.1jsnpmunverified

A remark-lint rule (v4.0.1, ESM-only, TypeScript typed) that warns when ordered list markers in Markdown violate a configured style (dot or parenthesis). Part of the remark-lint ecosystem, it supports detecting the first style used and flagging inconsistencies. Released as part of remark-lint monorepo with consistent versioning; compatible with Node.js 16+ and integrates with unified ecosystem. Differentiators: built-in fix support, preset inclusion (consistent, markdown-style-guide, recommended), and no runtime dependencies beyond remark-lint peer.

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

default
import remarkLintOrderedListMarkerStyle from 'remark-lint-ordered-list-marker-style'
const remarkLintOrderedListMarkerStyle = require('remark-lint-ordered-list-marker-style')
ESM-only; no CommonJS support since v3.
Options
import type {Options} from 'remark-lint-ordered-list-marker-style'
import {Options} from 'remark-lint-ordered-list-marker-style'
Options is a TypeScript type, not a runtime export. Use `import type`.
Style
import type {Style} from 'remark-lint-ordered-list-marker-style'
import {Style} from 'remark-lint-ordered-list-marker-style'
Style is a TypeScript type, not a runtime export.

Shows how to parse Markdown, lint ordered list markers with dot style, and process output.

import {unified} from 'unified'; import remarkParse from 'remark-parse'; import remarkStringify from 'remark-stringify'; import remarkLint from 'remark-lint'; import remarkLintOrderedListMarkerStyle from 'remark-lint-ordered-list-marker-style'; const processor = unified() .use(remarkParse) .use(remarkStringify) .use(remarkLint) .use(remarkLintOrderedListMarkerStyle, '.'); // Enforce dot style const md = '1. Item\n2) Item'; const file = await processor.process(md); console.log(String(file)); // Output includes warning about second marker
Debug
Known issues
breakingv3 dropped CommonJS support; package is ESM-only.
fix
Use `import` syntax instead of `require()`. Set `"type": "module"` in package.json or use `.mjs` extension.
affects: >=3.0.0
breakingv4 requires Node.js 16+; older versions of Node.js are no longer supported.
fix
Upgrade Node.js to version 16 or later.
affects: >=4.0.0
deprecatedThe `options` parameter default changed from `'consistent'` to `'consistent'` — no functional change, but always explicitly set options for clarity.
fix
Pass options explicitly: `.use(remarkLintOrderedListMarkerStyle, '.')`.
affects: >=1.0.0
gotchaThe rule only checks the marker character (`.` vs `)`), not numbering sequence order or starting value.
fix
Use additional rules like `remark-lint-ordered-list-marker-value` for numbering sequence checks.
affects: >=0.0.0
gotchaWhen using `'consistent'` option, the first ordered list marker style in the document sets the expected style; mixing styles will warn.
fix
Define a fixed style (e.g., `'.'` or `')'`) to avoid ambiguity.
affects: >=0.0.0
deprecatedThe rule previously accepted `'dot'` and `'paren'` as string styles; these were removed in v1.
fix
Use `'.'` or `')'` directly.
affects: >=0.0.0 <1.0.0
Errors
Common errors & fixes
Cannot find module 'remark-lint-ordered-list-marker-style'
Package not installed or wrong import path.
fix
Run `npm install remark-lint-ordered-list-marker-style` and verify that your import uses the correct ESM syntax.
Invalid option value: must be a string
Passing a non-string option (e.g., `true` or an object) to the plugin.
fix
Use one of the valid styles: `'.'`, `')'`, or `'consistent'`.
TypeError: remarkLintOrderedListMarkerStyle is not a function
Using CommonJS `require()` to import the package, which is ESM-only.
fix
Use `import` syntax or use dynamic `import()` for CommonJS modules.
Cannot use import statement outside a module
Missing `"type": "module"` in package.json or using `.js` instead of `.mjs`.
fix
Add `"type": "module"` to your package.json or rename file to `.mjs`.
Upgrade
Version history
4.0.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
remark-lint-ordered-list-marker-style — npm install remark-lint-ordered-list-marker-style · libregistry