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.
remarkLintNoHtml
✓ import remarkLintNoHtml from 'remark-lint-no-html'
✗ const remarkLintNoHtml = require('remark-lint-no-html')
This package is ESM-only since version 4 and does not provide a CommonJS export. Use import syntax.
Options
✓ import type { Options } from 'remark-lint-no-html'
✗ import { Options } from 'remark-lint-no-html'
Options is a TypeScript type, not a runtime value. Use import type for type-only imports.
remarkLintNoHtml (default export)
✓ import remarkLintNoHtml from 'remark-lint-no-html'
✗ import { remarkLintNoHtml } from 'remark-lint-no-html'
The package exports a single default function. Named import is not supported and will result in undefined.
Shows how to set up a unified pipeline with remark-lint-no-html, disallowing HTML comments, and process a Markdown string.
import { unified } from 'unified';
import remarkParse from 'remark-parse';
import remarkLint from 'remark-lint';
import remarkLintNoHtml from 'remark-lint-no-html';
import remarkStringify from 'remark-stringify';
import { reporter } from 'vfile-reporter';
const file = await unified()
.use(remarkParse)
.use(remarkLint)
.use(remarkLintNoHtml, { allowComments: false })
.use(remarkStringify)
.process('<h1>Hello</h1> <!-- comment -->');
console.error(reporter(file));
// 1:1-1:20: Unexpected HTML, use markdown instead
// 1:21-1:34: Unexpected HTML, use markdown instead
remark --version
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/remark-lint-no-html/index.js from /path/to/project not supported.
The package is ESM-only (v4+), but you are using require() to load it in a CommonJS module.
fixConvert your project to ESM (set type:module in package.json) or use dynamic import() with .cjs extension.
TypeError: remarkLintNoHtml is not a function
Attempted named import: import { remarkLintNoHtml } from 'remark-lint-no-html'. The package has no named export; only default export.
fixUse default import: import remarkLintNoHtml from 'remark-lint-no-html'
Cannot find module 'remark-lint-no-html'
Package not installed or incorrect import path (e.g., missing .js extension in ESM).
fixInstall with npm install remark-lint-no-html and ensure import path is correct.
Audit
Dependencies
unifiedrequiredUnified is the core processing pipeline; remark-lint-no-html is a unified plugin.
remark-lintrequiredremark-lint-no-html is a rule for remark-lint and requires remark-lint to be set up.
remark-parseoptionalRequired to parse Markdown input when using the API.
remark-stringifyoptionalRequired to stringify Markdown output when using the API.