{"id":26228,"library":"remark-lint-list-item-spacing","title":"remark-lint-list-item-spacing","description":"remark-lint rule to warn when lists violate a given style regarding blank lines between list items. Current stable version 5.0.1 is ESM-only and ships TypeScript types. Part of the remark-lint collection, it enforces consistent tight/loose list formatting based on options. Differentiators: defaults to markdown-style-guide preferences, supports custom checkBlanks option. Released as part of remark-lint monorepo with frequent updates; compatible with unified ecosystem.","status":"active","version":"5.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/remarkjs/remark-lint#main","tags":["javascript","item","lint","list","loose","remark","remark-lint","remark-lint-rule","rule","typescript"],"install":[{"cmd":"npm install remark-lint-list-item-spacing","lang":"bash","label":"npm"},{"cmd":"yarn add remark-lint-list-item-spacing","lang":"bash","label":"yarn"},{"cmd":"pnpm add remark-lint-list-item-spacing","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"required peer dependency for lint rule integration","package":"remark-lint","optional":false},{"reason":"needed to process markdown with unified pipeline","package":"unified","optional":true},{"reason":"needed for markdown parsing in unified pipeline","package":"remark-parse","optional":true}],"imports":[{"note":"ESM-only package since v5, cannot use require(). Default export.","wrong":"const remarkLintListItemSpacing = require('remark-lint-list-item-spacing')","symbol":"remarkLintListItemSpacing","correct":"import remarkLintListItemSpacing from 'remark-lint-list-item-spacing'"},{"note":"Options is a TypeScript type export, not a runtime value. Use type-only import.","wrong":"import { Options } from 'remark-lint-list-item-spacing'","symbol":"Options","correct":"import type { Options } from 'remark-lint-list-item-spacing'"},{"note":"The plugin must be used after remarkLint in the unified pipeline. Options object is optional.","wrong":".use(remarkLintListItemSpacing)","symbol":"remark-lint plugin usage","correct":".use(remarkLint).use(remarkLintListItemSpacing, { checkBlanks: true })"}],"quickstart":{"code":"import { unified } from 'unified';\nimport remarkParse from 'remark-parse';\nimport remarkStringify from 'remark-stringify';\nimport remarkLint from 'remark-lint';\nimport remarkLintListItemSpacing from 'remark-lint-list-item-spacing';\nimport { reporter } from 'vfile-reporter';\nimport { read } from 'to-vfile';\n\nconst file = await read('example.md');\n\nawait unified()\n  .use(remarkParse)\n  .use(remarkLint)\n  .use(remarkLintListItemSpacing, { checkBlanks: true })\n  .use(remarkStringify)\n  .process(file);\n\nconsole.error(reporter(file));","lang":"typescript","description":"Sets up unified pipeline with remark-lint and list-item-spacing rule, processes a markdown file and reports lint warnings."},"warnings":[{"fix":"Use import syntax or update to a bundler that supports ESM.","message":"Package is ESM-only since v5. Requires Node.js 16+ and cannot be required with CommonJS.","severity":"breaking","affected_versions":">=5.0.0"},{"fix":"Ensure .use(remarkLint) is called before .use(remarkLintListItemSpacing).","message":"The rule must be used after remarkLint in the unified plugins array, otherwise it won't work.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Set checkBlanks: true to check blank lines based on internal blank lines instead.","message":"The default behavior expects blank lines between items only when items span multiple lines, not when they contain blank lines internally. This can cause unexpected warnings.","severity":"gotcha","affected_versions":"<5.0.0"},{"fix":"Update to use object syntax: .use(remarkLintListItemSpacing, { checkBlanks: true })","message":"The rule previously accepted a boolean option to enable/disable checking blank lines; in v5 this was replaced with the options object.","severity":"deprecated","affected_versions":"<5.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'npm install remark-lint-list-item-spacing' or ensure it is in package.json.","cause":"Package not installed or version mismatch.","error":"Error: Cannot find module 'remark-lint-list-item-spacing'"},{"fix":"Use dynamic import() or switch to ESM: 'import remarkLintListItemSpacing from \"remark-lint-list-item-spacing\"'","cause":"Using CommonJS require() with ESM-only package.","error":"SyntaxError: Unexpected token 'export'"},{"fix":"Ensure correct import: import remarkLint from 'remark-lint' (default export).","cause":"Package possibly imported incorrectly (default vs named export).","error":"TypeError: (0 , remarkLint) is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}