A remark-lint rule that warns when closing tags are used for empty MDX JSX elements, enforcing self-closing syntax where possible. Current stable version is 1.0.1, released as part of the remark-lint monorepo. ESM-only, requires Node.js 16+. Ships TypeScript types. Part of the unified/remark ecosystem for linting Markdown and MDX files. Differentiates from general JSX linting by focusing specifically on MDX syntax and leveraging remark's AST.
npm install remark-lint-mdx-jsx-self-closeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates how to use the rule with the unified pipeline to lint MDX JSX self-closing tags.
Use import syntax or dynamic import(). For Node.js <16, upgrade or use an ESM-compatible runtime.
Use an additional rule like remark-lint-no-html-void-element or MDX-specific linting for void elements.
Ensure your files are parsed as MDX (with remark-mdx) for the rule to work correctly.
npm install remark-lint-mdx-jsx-self-close and use import instead of require.
Convert to import or use dynamic import().
Use import remarkLintMdxJsxSelfClose from 'remark-lint-mdx-jsx-self-close'