{"id":26221,"library":"remark-lint-linebreak-style","title":"remark-lint-linebreak-style","description":"remark-lint rule to warn when line endings (linebreaks) violate a given or detected style. Version 4.0.1 is the current stable release. It is part of the remark-lint ecosystem and is ESM-only (Node.js 16+). Provides configurable detection of consistent line endings (unix LF or windows CRLF) and can auto-detect the first used style. Ships TypeScript type definitions. Ideal for ensuring consistent line endings across markdown files.","status":"active","version":"4.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/remarkjs/remark-lint#main","tags":["javascript","break","crlf","lf","line","linebreak","lint","remark","remark-lint","typescript"],"install":[{"cmd":"npm install remark-lint-linebreak-style","lang":"bash","label":"npm"},{"cmd":"yarn add remark-lint-linebreak-style","lang":"bash","label":"yarn"},{"cmd":"pnpm add remark-lint-linebreak-style","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package is ESM-only. CommonJS require will fail.","wrong":"const remarkLintLinebreakStyle = require('remark-lint-linebreak-style')","symbol":"remarkLintLinebreakStyle","correct":"import remarkLintLinebreakStyle from 'remark-lint-linebreak-style'"},{"note":"TypeScript type import for configuration options.","symbol":"Options (type)","correct":"import type { Options } from 'remark-lint-linebreak-style'"},{"note":"TypeScript type for 'unix' or 'windows'.","symbol":"Style (type)","correct":"import type { Style } from 'remark-lint-linebreak-style'"}],"quickstart":{"code":"import remarkLint from 'remark-lint'\nimport remarkLintLinebreakStyle from 'remark-lint-linebreak-style'\nimport remarkParse from 'remark-parse'\nimport remarkStringify from 'remark-stringify'\nimport {read} from 'to-vfile'\nimport {unified} from 'unified'\nimport {reporter} from 'vfile-reporter'\n\nconst file = await read('example.md')\n\nawait unified()\n  .use(remarkParse)\n  .use(remarkLint)\n  .use(remarkLintLinebreakStyle, 'unix')\n  .use(remarkStringify)\n  .process(file)\n\nconsole.error(reporter(file))","lang":"typescript","description":"Lints a markdown file for consistent unix line endings using remark-lint and this plugin. Ensure 'example.md' exists."},"warnings":[{"fix":"Switch to import syntax or use dynamic import().","message":"Version 4+ is ESM-only; CommonJS require() will throw.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"","message":"No deprecated versions known.","severity":"deprecated","affected_versions":""},{"fix":"Use 'unix' or 'windows' explicitly if consistent enforcement is needed.","message":"The 'consistent' option auto-detects the first line ending and warns on subsequent mismatches. It does not enforce a specific style.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use a separate tool (e.g., text editor settings) to enforce final output line endings.","message":"remark-stringify always outputs Unix line endings (LF), regardless of the lint configuration. This plugin only warns, it does not fix.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Replace require() with import statement, or use dynamic import().","cause":"Package is ESM-only; CommonJS require() is used.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module"},{"fix":"Ensure unified().use(remarkParse).use(remarkLint).use(...) chain is correct.","cause":"Plugin used without first configuring remark-lint or missing remarkParse/remarkStringify.","error":"TypeError: Cannot read properties of undefined (reading 'type')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}