Registry / testing / remark-lint-no-heading-like-paragraph

remark-lint-no-heading-like-paragraph

JSON →
library4.0.1jsnpmunverified

A remark-lint rule that warns when a markdown paragraph starts with too many hash characters (#), making it resemble a heading but with more than the allowed maximum of six levels. Current stable version is 4.0.1, ESM-only, requires Node.js 16+. It is part of the unified/remark ecosystem and ships TypeScript types. Unlike general linting presets, this rule specifically targets invalid heading-like paragraphs, catching common typos where users accidentally add extra hashes (e.g., ####### Venus). No options are needed. Releases follow the main remark-lint monorepo.

npm install remark-lint-no-heading-like-paragraph
INSTALL
IMPORT
SIG · REMARK-LINT-NO-HEA
R
remark-lint-no-heading-like-paragraph
testingjavascriptv4.0.1
harness data pending
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.

default
import remarkLintNoHeadingLikeParagraph from 'remark-lint-no-heading-like-paragraph'
const remarkLintNoHeadingLikeParagraph = require('remark-lint-no-heading-like-paragraph')
ESM-only since v4; require() will throw an error.
remarkLintNoHeadingLikeParagraph
import remarkLintNoHeadingLikeParagraph from 'remark-lint-no-heading-like-paragraph'
import { remarkLintNoHeadingLikeParagraph } from 'remark-lint-no-heading-like-paragraph'
The package only has a default export, not a named export.
type imports
import type { Transformer } from 'unified'
import type { remarkLintNoHeadingLikeParagraph } from 'remark-lint-no-heading-like-paragraph'
No TypeScript types are exported from this package; types are inferred from unified and remark-lint.

Shows how to use the rule with unified, remark-lint, and vfile-reporter to lint a markdown file.

import { unified } from 'unified'; import remarkParse from 'remark-parse'; import remarkStringify from 'remark-stringify'; import remarkLint from 'remark-lint'; import remarkLintNoHeadingLikeParagraph from 'remark-lint-no-heading-like-paragraph'; import { read } from 'to-vfile'; import { reporter } from 'vfile-reporter'; const file = await read('example.md'); const result = await unified() .use(remarkParse) .use(remarkLint) .use(remarkLintNoHeadingLikeParagraph) .use(remarkStringify) .process(file); console.error(reporter(result));
Debug
Known issues
breakingv4 is ESM-only; Node.js 16+ required.
fix
Use import instead of require, or stick with v3 if CommonJS is needed.
affects: >=4.0.0
deprecatedv3 is no longer maintained.
fix
Upgrade to v4 and switch to ESM.
affects: <4.0.0
gotchaThe rule does not warn on headings with 1-6 hashes, only 7+.
fix
This is by design; use other rules like remark-lint-heading-style for heading linting.
affects: >=1.0.0
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module
Using require() to load this ESM-only package.
fix
Change to import statement: import remarkLintNoHeadingLikeParagraph from 'remark-lint-no-heading-like-paragraph'
TypeError: (intermediate value).use is not a function
Forgetting to import remark-lint before this rule.
fix
Ensure you call .use(remarkLint) before .use(remarkLintNoHeadingLikeParagraph)
Cannot find module 'remark-lint-no-heading-like-paragraph'
Package not installed or import path incorrect.
fix
Run npm install remark-lint-no-heading-like-paragraph and ensure the import path is correct.
Upgrade
Version history
4.0.1latest on npm
Audit
Dependencies
unifiedrequiredUnified is the core processor required for remark plugins.
remark-lintrequiredThis rule requires remark-lint to be applied as a unified plugin.
Agent activity
4 hits · last 30 days
node
4
Resources
remark-lint-no-heading-like-paragraph — npm install remark-lint-no-heading-like-paragraph · libregistry