Registry /
web-framework / remark-lint-mdx-jsx-no-void-children
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 (remarkLintMdxJsxNoVoidChildren)
✓ import remarkLintMdxJsxNoVoidChildren from 'remark-lint-mdx-jsx-no-void-children'
✗ const remarkLintMdxJsxNoVoidChildren = require('remark-lint-mdx-jsx-no-void-children')
Package is ESM-only; CommonJS require() will fail.
remarkLintMdxJsxNoVoidChildren (named)
✓ import { remarkLintMdxJsxNoVoidChildren } from 'remark-lint-mdx-jsx-no-void-children'
✗ import remarkLintMdxJsxNoVoidChildren from 'remark-lint-mdx-jsx-no-void-children'
This package exports no named exports; the default export is the function. Named import will result in undefined.
TypeScript usage
✓ import remarkLintMdxJsxNoVoidChildren from 'remark-lint-mdx-jsx-no-void-children'
✗ import remarkLintMdxJsxNoVoidChildren from 'remark-lint-mdx-jsx-no-void-children'
Package includes TypeScript types; no separate type import needed.
Shows how to configure the remark-lint rule with unified to lint an MDX file for void elements with children.
import { unified } from 'unified'
import remarkParse from 'remark-parse'
import remarkStringify from 'remark-stringify'
import remarkLint from 'remark-lint'
import remarkLintMdxJsxNoVoidChildren from 'remark-lint-mdx-jsx-no-void-children'
import { read } from 'to-vfile'
import { reporter } from 'vfile-reporter'
const file = await read('example.mdx')
await unified()
.use(remarkParse)
.use(remarkLint)
.use(remarkLintMdxJsxNoVoidChildren)
.use(remarkStringify)
.process(file)
console.error(reporter(file))
Errors
Common errors & fixes
Cannot find module 'remark-lint-mdx-jsx-no-void-children'
Package not installed or not in node_modules.
fixRun: npm install remark-lint-mdx-jsx-no-void-children
ERR_REQUIRE_ESM
Using CommonJS require() to import an ESM-only package.
fixSwitch to import syntax or use dynamic import().
TypeError: remarkLintMdxJsxNoVoidChildren is not a function
Incorrect import style, e.g., named import instead of default import.
fixUse: import remarkLintMdxJsxNoVoidChildren from 'remark-lint-mdx-jsx-no-void-children'
Audit
Dependencies
unifiedrequiredPeer dependency for the unified ecosystem; remark-lint plugins require unified to work.
remark-lintrequiredThis plugin is a rule for remark-lint; it must be used together with remark-lint.
remark-mdxoptionalRequired to parse MDX files; the rule is designed for MDX syntax.