A remark-lint rule that validates syntax of code blocks in Markdown files. Supports JavaScript, JSON, JSONC, JSON5, YAML, and CSS. Uses SWC for JavaScript parsing (since v0.4.0) and PostCSS for CSS (since v0.5.0). ESM-only since v0.3.0, requires Node.js >=18 (since v0.8.0). Active development, monthly releases. Differentiators: language alias support, broad language coverage, integrates with remark ecosystem.
npm install remark-lint-code-block-syntaxNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates linting Markdown with an invalid JavaScript code block and reporting the warning.
Upgrade Node.js to version 18 or higher.
Use import syntax instead of require().
No action needed, but note that parsing is now faster and may catch different errors.
Upgrade to Node.js 18 or higher.
Check if your language is supported. See README for list.
Convert to import statement or use dynamic import().
Import the rule and pass it as a function: .use(remarkLintCodeBlockSyntax).