A remark-lint rule to warn when too many spaces are used to create a hard break (line break) in Markdown. Current stable version: 4.1.1 (ESM-only, TypeScript types included). Release cadence: follows remark-lint monorepo releases. Key differentiators: as part of the official remark-lint ecosystem, it integrates seamlessly with unified/remark and supports presets like remark-preset-lint-recommended. It enforces consistent hard break style (exactly 2 trailing spaces) and can optionally disallow space-based hard breaks entirely in favor of backslash escapes.
npm install remark-lint-hard-break-spacesNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Lints a Markdown file using remark, with the hard-break-spaces rule configured to disallow trailing space hard breaks (enforce backslash).
Use dynamic import() or switch to an ESM project. If you must use CommonJS, stay on v3.x.
Use `import remarkLintHardBreakSpaces from 'remark-lint-hard-break-spaces'` instead of `import { default } from ...`.Explicitly set `{ allowSpaces: true/false }` to avoid surprises in future upgrades.Ensure `.use(remarkLint)` is called before `.use(remarkLintHardBreakSpaces)`.
Use `allowSpaces: false` to require backslash escapes for hard breaks.
This is by design. If you need to lint inside code comments or HTML, use a separate plugin.
Run `npm install remark-lint-hard-break-spaces` and ensure the import path matches the package name.
Use `import remarkLintHardBreakSpaces from 'remark-lint-hard-break-spaces'` in an ESM context, or downgrade to v3.x.
Use `import remarkLintHardBreakSpaces from 'remark-lint-hard-break-spaces'` (no curly braces).
Ensure the plugin is referenced correctly in `.use()`: `unified().use(remarkLintHardBreakSpaces)`.