A remark-lint rule to enforce a consistent style for em dashes (mdash) in Markdown files. Version 1.1.1 is the current stable release, with no fixed release cadence. It offers three style options: '―' (Unicode em dash, default), '-' (single hyphen), and '--' (double hyphen). Unlike general-purpose linters, this package specifically targets mdash usage, a common typographic inconsistency. It is a lightweight plugin for the remark-lint ecosystem, primarily used in Node.js environments for CI or text processing pipelines. The package has no dependencies and is ESM-compatible but requires a CommonJS or ESM project that uses remark-lint.
npm install remark-lint-mdash-styleNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to use remark-lint-mdash-style with remark-lint in an ESM environment, including configuration and processing of a Markdown string.
Switch to import syntax or use dynamic import if in a CommonJS context.
Consider using '--' or the Unicode em dash '—' instead, as single hyphen is ambiguous with bullet lists.
Use .use(plugin, { style: '--' }) instead of .use(plugin, '--').If you need to lint inline code, consider additional remark plugins.
Explicitly set a style that matches your project's conventions, e.g., '--'.
Run 'npm install remark-lint-mdash-style' and ensure it is in dependencies.
Replace require() with import or use dynamic import: const plugin = (await import('remark-lint-mdash-style')).default;Ensure you import the default export: import remarkLintMdashStyle from 'remark-lint-mdash-style'.
Either change the text to use '—' or configure the rule with style: '--' or style: '-'.
No dependency data recorded yet.