{"id":26295,"library":"remark-preset-lint-markdown-style-guide","title":"remark-preset-lint-markdown-style-guide","description":"Remark preset that configures remark-lint rules to enforce the Markdown Style Guide. Version 6.0.1 ships TypeScript types and is actively maintained as part of the remark-lint monorepo. It includes 30+ lint rules with sensible defaults like fenced code blocks, ATX headings, and hyphen unordered list markers. Unlike generic presets, this one maps directly to an existing style guide and supports overrides for space-sentence, wrap, header, list-marker, list-space, and code options. Release cadence is patch-level; breaking changes are rare and documented in changelogs.","status":"active","version":"6.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/remarkjs/remark-lint#main","tags":["javascript","guide","markdown","preset","remark","remark-lint","remark-preset","style","typescript"],"install":[{"cmd":"npm install remark-preset-lint-markdown-style-guide","lang":"bash","label":"npm"},{"cmd":"yarn add remark-preset-lint-markdown-style-guide","lang":"bash","label":"yarn"},{"cmd":"pnpm add remark-preset-lint-markdown-style-guide","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core linting engine required to run the preset","package":"remark-lint","optional":false}],"imports":[{"note":"ESM-only since v6. Use dynamic import or switch to ESM.","wrong":"const remarkPresetLintMarkdownStyleGuide = require('remark-preset-lint-markdown-style-guide')","symbol":"remarkPresetLintMarkdownStyleGuide","correct":"import remarkPresetLintMarkdownStyleGuide from 'remark-preset-lint-markdown-style-guide'"},{"note":"This preset exports a default, not a named export. Named import will result in undefined.","wrong":"import { remarkPresetLintMarkdownStyleGuide } from 'remark-preset-lint-markdown-style-guide'","symbol":"remarkPresetLintMarkdownStyleGuide","correct":"import remarkPresetLintMarkdownStyleGuide from 'remark-preset-lint-markdown-style-guide'"},{"note":"Options type is only available as a type export. Use type import to avoid runtime errors.","wrong":"import { Options } from 'remark-preset-lint-markdown-style-guide'","symbol":"type Options","correct":"import type { Options } from 'remark-preset-lint-markdown-style-guide'"}],"quickstart":{"code":"import { unified } from 'unified';\nimport remarkParse from 'remark-parse';\nimport remarkPresetLintMarkdownStyleGuide from 'remark-preset-lint-markdown-style-guide';\nimport remarkStringify from 'remark-stringify';\nimport remarkLint from 'remark-lint';\n\nconst processor = unified()\n  .use(remarkParse)\n  .use(remarkLint)\n  .use(remarkPresetLintMarkdownStyleGuide)\n  .use(remarkStringify);\n\nconst file = await processor.process('## Hello world');\nconsole.log(file.messages); // lint warnings/errors","lang":"typescript","description":"Shows how to set up a unified pipeline with remark-lint and the markdown style guide preset, then lint a simple markdown string."},"warnings":[{"fix":"Migrate to ESM or use dynamic import: const pkg = await import('remark-preset-lint-markdown-style-guide')","message":"v6.0.0 dropped CommonJS support. Package is now ESM-only.","severity":"breaking","affected_versions":"<6.0.0"},{"fix":"Override 'remark-lint-heading-style' option to 'setext' via preset configuration.","message":"The option 'header:setext' uses a deprecated method; prefer ATX headings.","severity":"deprecated","affected_versions":">=6.0.0"},{"fix":"Update Node.js to version 12 or later.","message":"v5.0.0 renamed the presets from 'remark-preset-lint-markdown-style-guide' to 'remark-preset-lint-markdown-style-guide' (no change) but removed support for Node < 12.","severity":"breaking","affected_versions":"<5.0.0"},{"fix":"Do not include 'remark-lint' separately unless you need custom options.","message":"The preset includes remark-lint automatically; adding it twice causes duplicate linting.","severity":"gotcha","affected_versions":">=4.0.0"},{"fix":"Follow the README's override patterns: e.g., use ['remark-lint-maximum-line-length', false] to disable line length.","message":"Options like 'wrap:no', 'header:setext', etc. must be configured via overriding individual lint rules, not by passing options to the preset.","severity":"gotcha","affected_versions":">=6.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"npm install remark-preset-lint-markdown-style-guide and ensure your project is ESM or use dynamic import.","cause":"Missing installation or wrong import path in a CommonJS project.","error":"Cannot find module 'remark-preset-lint-markdown-style-guide'"},{"fix":"Change to: import remarkPresetLintMarkdownStyleGuide from 'remark-preset-lint-markdown-style-guide'","cause":"Using named import instead of default import.","error":"TypeError: remarkPresetLintMarkdownStyleGuide is not a function"},{"fix":"Set type: 'module' in package.json or rename file to .mjs.","cause":"Attempting to use ESM import in a CommonJS file.","error":"Error: Cannot use import statement outside a module"},{"fix":"Correct syntax: ['remark-lint-maximum-line-length', false] (array of two elements)","cause":"Passing a boolean false to disable a rule, but the preset expects an object or array.","error":"The option 'remark-lint-maximum-line-length' is not a boolean"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}