Registry / testing / remark-lint-strikethrough-marker

remark-lint-strikethrough-marker

JSON →
library3.0.1jsnpmunverified

remark-lint rule to enforce consistent GFM strikethrough markers (one tilde vs two). Current stable version is 3.0.1, ESM-only, requires Node.js 16+. Part of the remark-lint monorepo, ships TypeScript definitions. Unopinionated: default 'consistent' detects the first style and warns on deviations. Unlike general Markdown linting, this specifically targets the strikethrough marker count, a common source of inconsistency when using remark-gfm.

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

remarkLintStrikethroughMarker
import remarkLintStrikethroughMarker from 'remark-lint-strikethrough-marker'
import { remarkLintStrikethroughMarker } from 'remark-lint-strikethrough-marker'
Default export only, no named export.
Marker
import type { Marker } from 'remark-lint-strikethrough-marker'
import { Marker } from 'remark-lint-strikethrough-marker'
Available as a type import (TypeScript).
Options
import type { Options } from 'remark-lint-strikethrough-marker'
import { Options } from 'remark-lint-strikethrough-marker'
Available as a type import (TypeScript).

Lint an MD file with remark-lint-strikethrough-marker enforcing two-tilde style, including GFM and reporter.

import { unified } from 'unified' import remarkParse from 'remark-parse' import remarkStringify from 'remark-stringify' import remarkLint from 'remark-lint' import remarkLintStrikethroughMarker from 'remark-lint-strikethrough-marker' import remarkGfm from 'remark-gfm' import { read } from 'to-vfile' import { reporter } from 'vfile-reporter' const file = await unified() .use(remarkParse) .use(remarkGfm) .use(remarkLint) .use(remarkLintStrikethroughMarker, '~~') .use(remarkStringify) .process(await read('example.md')) console.error(reporter(file))
Debug
Known issues
breakingESM-only package: requires Node.js 16+ and cannot be used with CommonJS require()
fix
Switch to ESM, use import syntax, or upgrade Node.js to 16+.
affects: >=3.0.0
deprecatedPlugin does not provide a preset; will not be auto-configured by remark-preset-lint-consistent or similar
fix
Manually add the plugin to your remark-lint configuration.
affects: *
gotchaRequires remark-gfm to be registered before remark-lint-strikethrough-marker, otherwise strikethrough syntax is not parsed
fix
Ensure .use(remarkGfm) is called before the lint rule.
affects: *
gotchaTypeScript types (Marker, Options) are only available via import type, not value imports
fix
Use import type { Marker, Options } from 'remark-lint-strikethrough-marker'.
affects: *
Errors
Common errors & fixes
TypeError: Cannot read properties of undefined (reading 'strikethrough')
remark-gfm not added before the lint rule
fix
Add .use(remarkGfm) before .use(remarkLintStrikethroughMarker).
Error [ERR_REQUIRE_ESM]: require() of ES Module not supported
Trying to require() an ESM-only package
fix
Use import syntax or set type: module in package.json.
Module '"remark-lint-strikethrough-marker"' has no exported member 'remarkLintStrikethroughMarker'
Using named import instead of default import
fix
Use import remarkLintStrikethroughMarker from 'remark-lint-strikethrough-marker' (default import).
Upgrade
Version history
3.0.1latest on npm
Audit
Dependencies
remark-lintrequiredPeer dependency providing the linting framework and report generation
remark-gfmoptionalRequired to enable GFM strikethrough syntax in parsing; must be added separately
Agent activity
8 hits · last 30 days
node
6
OpenAI (training)
2
Resources
remark-lint-strikethrough-marker — npm install remark-lint-strikethrough-marker · libregistry