Registry /
testing / remark-lint-linebreak-style
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.
remarkLintLinebreakStyle
✓ import remarkLintLinebreakStyle from 'remark-lint-linebreak-style'
✗ const remarkLintLinebreakStyle = require('remark-lint-linebreak-style')
Package is ESM-only. CommonJS require will fail.
Options (type)
✓ import type { Options } from 'remark-lint-linebreak-style'
TypeScript type import for configuration options.
Style (type)
✓ import type { Style } from 'remark-lint-linebreak-style'
TypeScript type for 'unix' or 'windows'.
Lints a markdown file for consistent unix line endings using remark-lint and this plugin. Ensure 'example.md' exists.
import remarkLint from 'remark-lint'
import remarkLintLinebreakStyle from 'remark-lint-linebreak-style'
import remarkParse from 'remark-parse'
import remarkStringify from 'remark-stringify'
import {read} from 'to-vfile'
import {unified} from 'unified'
import {reporter} from 'vfile-reporter'
const file = await read('example.md')
await unified()
.use(remarkParse)
.use(remarkLint)
.use(remarkLintLinebreakStyle, 'unix')
.use(remarkStringify)
.process(file)
console.error(reporter(file))
Debug
Known issues
breakingVersion 4+ is ESM-only; CommonJS require() will throw.fixSwitch to import syntax or use dynamic import().
affects: >=4.0.0
deprecatedNo deprecated versions known.
gotchaThe 'consistent' option auto-detects the first line ending and warns on subsequent mismatches. It does not enforce a specific style.fixUse 'unix' or 'windows' explicitly if consistent enforcement is needed.
affects: >=1.0.0
gotcharemark-stringify always outputs Unix line endings (LF), regardless of the lint configuration. This plugin only warns, it does not fix.fixUse a separate tool (e.g., text editor settings) to enforce final output line endings.
affects: >=1.0.0
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module
Package is ESM-only; CommonJS require() is used.
fixReplace require() with import statement, or use dynamic import().
TypeError: Cannot read properties of undefined (reading 'type')
Plugin used without first configuring remark-lint or missing remarkParse/remarkStringify.
fixEnsure unified().use(remarkParse).use(remarkLint).use(...) chain is correct.
Audit
Dependencies
No dependency data recorded yet.