{"library":"remark-lint-mdx-jsx-no-void-children","title":"remark-lint-mdx-jsx-no-void-children","description":"remark-lint rule to warn when void HTML elements (such as `<br>`, `<hr>`, `<img>`) in MDX JSX have children (either JSX children or props like `children` or `dangerouslySetInnerHTML`). Current stable version is 1.0.1, part of the remark-lint ecosystem. It assumes standard HTML void element semantics and React-like prop conventions. This rule is ESM-only and requires Node.js 16+. Unlike generic JSX linting, it is specifically tailored for MDX files processed by remark.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install remark-lint-mdx-jsx-no-void-children"],"cli":null},"imports":["import remarkLintMdxJsxNoVoidChildren from 'remark-lint-mdx-jsx-no-void-children'","import { remarkLintMdxJsxNoVoidChildren } from 'remark-lint-mdx-jsx-no-void-children'","import remarkLintMdxJsxNoVoidChildren from 'remark-lint-mdx-jsx-no-void-children'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { unified } from 'unified'\nimport remarkParse from 'remark-parse'\nimport remarkStringify from 'remark-stringify'\nimport remarkLint from 'remark-lint'\nimport remarkLintMdxJsxNoVoidChildren from 'remark-lint-mdx-jsx-no-void-children'\nimport { read } from 'to-vfile'\nimport { reporter } from 'vfile-reporter'\n\nconst file = await read('example.mdx')\n\nawait unified()\n  .use(remarkParse)\n  .use(remarkLint)\n  .use(remarkLintMdxJsxNoVoidChildren)\n  .use(remarkStringify)\n  .process(file)\n\nconsole.error(reporter(file))","lang":"typescript","description":"Shows how to configure the remark-lint rule with unified to lint an MDX file for void elements with children.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}