Registry / testing / remark-lint-fenced-code-marker

remark-lint-fenced-code-marker

JSON →
library4.0.1jsnpmunverified

remark-lint rule that warns when fenced code block markers (backticks or tildes) are inconsistent. Version 4.0.1, part of the remark-lint ecosystem. It checks that all fenced code blocks use the same marker style, defaulting to 'consistent' (first style detected). Works with unified processor, ships TypeScript types, ESM-only since version 4, actively maintained. Recommended preset uses backticks.

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

default
import remarkLintFencedCodeMarker from 'remark-lint-fenced-code-marker'
const remarkLintFencedCodeMarker = require('remark-lint-fenced-code-marker')
Package is ESM-only since v4; CommonJS require() will fail.
Marker
import type { Marker } from 'remark-lint-fenced-code-marker'
import { Marker } from 'remark-lint-fenced-code-marker'
Marker is a TypeScript type, use 'import type' for type-only imports.
Options
import type { Options } from 'remark-lint-fenced-code-marker'
const { Options } = require('remark-lint-fenced-code-marker')
Options is a TypeScript type; use 'import type' or ignore if not using TS.

Sets up a unified pipeline to lint fenced code marker style in an MD file, enforcing backticks.

import { unified } from 'unified'; import remarkParse from 'remark-parse'; import remarkStringify from 'remark-stringify'; import remarkLint from 'remark-lint'; import remarkLintFencedCodeMarker from 'remark-lint-fenced-code-marker'; import { read } from 'to-vfile'; import { reporter } from 'vfile-reporter'; const file = await read('example.md'); await unified() .use(remarkParse) .use(remarkLint) .use(remarkLintFencedCodeMarker, '`') .use(remarkStringify) .process(file); console.error(reporter(file));
Debug
Known issues
breakingPackage is now ESM-only; CommonJS require() will throw ERR_REQUIRE_ESM.
fix
Switch to dynamic import() or update project to ESM.
affects: >=4.0.0
breakingUnified ecosystem now requires Node.js >=16.
fix
Upgrade Node.js to version 16 or higher.
affects: >=4.0.0
deprecated'remark-lint' must be explicitly added before rule plugins; auto-registration removed.
fix
Add .use(remarkLint) before rule plugins.
affects: >=4.0.0
gotchaOptions default to 'consistent' which detects first marker; if file has mixed markers, only the first is used as standard.
fix
Explicitly set option to '`' or '~' to enforce a specific style.
affects: >=1.0.0
Errors
Common errors & fixes
ERR_REQUIRE_ESM: require() of ES Module
Using CommonJS require() on an ESM-only package (v4+).
fix
Use import or upgrade to ESM: switch project to 'type': 'module' in package.json.
Error: Cannot find module 'remark-lint-fenced-code-marker'
Package not installed or version mismatch with peer dependencies.
fix
Run 'npm install remark-lint-fenced-code-marker' and ensure unified and remark-lint are installed.
TypeError: remarkLintFencedCodeMarker is not a function
CommonJS require() returns an object with default property for ESM packages; also likely missing .use(remarkLint) before.
fix
Use import syntax and ensure .use(remarkLint) is added before the rule plugin.
Upgrade
Version history
4.0.1latest on npm
Audit
Dependencies
unifiedrequiredrequired peer dependency for remark-lint integration
remark-lintrequiredrequired peer dependency to activate lint rules
Agent activity
4 hits · last 30 days
node
4
Resources
remark-lint-fenced-code-marker — npm install remark-lint-fenced-code-marker · libregistry