{"id":26258,"library":"remark-lint-no-heading-indent","title":"remark-lint-no-heading-indent","description":"A remark-lint rule to warn when Markdown headings are indented. Current stable version is 5.0.1, released as part of the remark-lint monorepo. This package is ESM-only (Node.js 16+). It checks that headings have no leading whitespace, enforcing consistent heading style. Unlike other lint rules, it has no options and is recommended to avoid uncommon indentation that can conflict with indented code blocks. The remark-lint ecosystem provides modular, pluggable linting for Markdown files.","status":"active","version":"5.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/remarkjs/remark-lint#main","tags":["javascript","heading","indent","lint","remark","remark-lint","remark-lint-rule","rule","typescript"],"install":[{"cmd":"npm install remark-lint-no-heading-indent","lang":"bash","label":"npm"},{"cmd":"yarn add remark-lint-no-heading-indent","lang":"bash","label":"yarn"},{"cmd":"pnpm add remark-lint-no-heading-indent","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required peer dependency for remark-lint plugins to work with unified processing pipeline.","package":"unified","optional":false},{"reason":"Required peer dependency to register the rule and integrate with remark-lint's linting infrastructure.","package":"remark-lint","optional":false}],"imports":[{"note":"Package is ESM-only since v5; require() will fail.","wrong":"const remarkLintNoHeadingIndent = require('remark-lint-no-heading-indent')","symbol":"remarkLintNoHeadingIndent","correct":"import remarkLintNoHeadingIndent from 'remark-lint-no-heading-indent'"},{"note":"The package uses a default export, not a named export.","wrong":"import { remarkLintNoHeadingIndent } from 'remark-lint-no-heading-indent'","symbol":"default export","correct":"import remarkLintNoHeadingIndent from 'remark-lint-no-heading-indent'"},{"note":"Package ships TypeScript types (from unified/remark-lint) but no custom types to import.","wrong":"","symbol":"Type types","correct":"import type { Transformer } from 'unified'"}],"quickstart":{"code":"import remarkLint from 'remark-lint'\nimport remarkLintNoHeadingIndent from 'remark-lint-no-heading-indent'\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(remarkLintNoHeadingIndent)\n  .use(remarkStringify)\n  .process(file)\n\nconsole.error(reporter(file))","lang":"typescript","description":"Set up a unified pipeline with remark-parse, remark-lint, the no-heading-indent rule, and remark-stringify, then process a markdown file and output lint messages."},"warnings":[{"fix":"Use import syntax or dynamic import(). For Node.js <16, you cannot use this package; upgrade to Node.js 16+.","message":"Package is ESM-only starting from v5. CommonJS require() will throw an ERR_REQUIRE_ESM error.","severity":"breaking","affected_versions":">=5.0.0"},{"fix":"Ensure unified and remark-lint are installed: npm install unified remark-lint remark-lint-no-heading-indent.","message":"Peer dependencies (unified, remark-lint) must be installed separately. Missing them causes runtime errors like 'Cannot find module'.","severity":"breaking","affected_versions":">=5.0.0"},{"fix":"Update import to current ESM style; old CommonJS usage will break.","message":"The package's default export name changed from 'remarkLintNoHeadingIndent' to the same but with a different internal implementation. No API change, but rely on the documented import path.","severity":"deprecated","affected_versions":">=4.0.0 <5.0.0"},{"fix":"Simply use .use(remarkLintNoHeadingIndent) without arguments.","message":"The rule has no options, but users sometimes try to pass an options object (e.g., { severity: 'warning' }). This will be silently ignored.","severity":"gotcha","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":"Change to import statement: import remarkLintNoHeadingIndent from 'remark-lint-no-heading-indent'","cause":"Using require() on an ESM-only package.","error":"ERR_REQUIRE_ESM"},{"fix":"Install unified: npm install unified","cause":"Missing peer dependency 'unified'.","error":"Cannot find module 'unified'"},{"fix":"Use default import: import remarkLintNoHeadingIndent from 'remark-lint-no-heading-indent'","cause":"Using named import instead of default import (e.g., import { remarkLintNoHeadingIndent } from '...')","error":"TypeError: remarkLintNoHeadingIndent is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}