Registry / testing / remark-lint-strong-marker

remark-lint-strong-marker

JSON →
library4.0.1jsnpmunverified

A remark-lint rule that warns when strong (bold) markers are inconsistent. Version 4.0.1 is the latest stable release (ESM-only, Node.js 16+). It enforces a consistent style for strong markers (`*` or `_`) or auto-detects the first style used. Part of the remark-lint ecosystem with presets like `remark-preset-lint-consistent`. Ships TypeScript declarations. Has no runtime dependencies beyond remark-lint.

npm install remark-lint-strong-marker
INSTALL
IMPORT
SIG · REMARK-LINT-STRONG
R
remark-lint-strong-marker
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.

remarkLintStrongMarker
import remarkLintStrongMarker from 'remark-lint-strong-marker'
const remarkLintStrongMarker = require('remark-lint-strong-marker')
ESM-only since v3; CommonJS require is not supported.
Marker
import type { Marker } from 'remark-lint-strong-marker'
TypeScript type export for marker style ('*' | '_'). Use type import to avoid runtime overhead.
Options
import type { Options } from 'remark-lint-strong-marker'
TypeScript type export for plugin options (Marker or 'consistent').

Checks strong markers in example.md, reporting any inconsistent use.

import remarkLint from 'remark-lint' import remarkLintStrongMarker from 'remark-lint-strong-marker' 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(remarkLintStrongMarker) .use(remarkStringify) .process(file) console.error(reporter(file))
Debug
Known issues
breakingPackage is ESM-only; using require() throws an error.
fix
Use import syntax (ESM). For CommonJS projects, use dynamic import: const m = await import('remark-lint-strong-marker')
affects: >=3.0.0
gotchaThe plugin must be used after remarkParse and before remarkStringify. Incorrect order causes no linting.
fix
Ensure .use(remarkParse).use(remarkLint).use(remarkLintStrongMarker).use(remarkStringify) order
affects: all
deprecatedNo deprecated versions known; rule remains stable.
affects: none
gotchaIf no defaults are set, the rule uses 'consistent' mode: warns when a strong marker differs from the first used style.
fix
Specify options explicitly: .use(remarkLintStrongMarker, '*') or .use(remarkLintStrongMarker, '_')
affects: >=1.0.0
gotchaThe rule only checks strong markers, not emphasis or other formatting.
fix
Use separate remark-lint rules for emphasis markers (e.g., remark-lint-emphasis-marker).
affects: all
breakingNode.js version requirement changed from 12 to 16.
fix
Upgrade Node.js to version 16 or later.
affects: >=3.0.0
Errors
Common errors & fixes
Cannot find module 'remark-lint-strong-marker'
Package not installed or not in node_modules.
fix
Run: npm install remark-lint-strong-marker
SyntaxError: Unexpected token 'export'
Using CommonJS require() in an ESM-only package.
fix
Switch to ESM imports as shown above, or use dynamic import.
TypeError: Cannot read properties of undefined (reading 'type')
The plugin is used before the remark parser.
fix
Add .use(remarkParse) before .use(remarkLintStrongMarker).
Expected a `Marker` but got `'**'`
Invalid option value: strong markers must be single `*` or `_`, not `**`.
fix
Use '*' or '_' as the option value.
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-strong-marker — npm install remark-lint-strong-marker · libregistry