remark-lint-strong-marker
raw JSON → 4.0.1 verified Fri May 01 auth: no javascript
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.
Common errors
error Cannot find module 'remark-lint-strong-marker' ↓
cause Package not installed or not in node_modules.
fix
Run: npm install remark-lint-strong-marker
error SyntaxError: Unexpected token 'export' ↓
cause Using CommonJS require() in an ESM-only package.
fix
Switch to ESM imports as shown above, or use dynamic import.
error TypeError: Cannot read properties of undefined (reading 'type') ↓
cause The plugin is used before the remark parser.
fix
Add .use(remarkParse) before .use(remarkLintStrongMarker).
error Expected a `Marker` but got `'**'` ↓
cause Invalid option value: strong markers must be single `*` or `_`, not `**`.
fix
Use '*' or '_' as the option value.
Warnings
breaking Package 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')
gotcha The 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
deprecated No deprecated versions known; rule remains stable.
gotcha If 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, '_')
gotcha The 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).
breaking Node.js version requirement changed from 12 to 16. ↓
fix Upgrade Node.js to version 16 or later.
Install
npm install remark-lint-strong-marker yarn add remark-lint-strong-marker pnpm add remark-lint-strong-marker Imports
- remarkLintStrongMarker wrong
const remarkLintStrongMarker = require('remark-lint-strong-marker')correctimport remarkLintStrongMarker from 'remark-lint-strong-marker' - Marker
import type { Marker } from 'remark-lint-strong-marker' - Options
import type { Options } from 'remark-lint-strong-marker'
Quickstart
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))