Closed u3u closed 6 months ago
OK, the react/self-closing-comp
part is just as same as #437.
After automatic sorting of JSX attributes, the content and attributes no longer correspond.
Just for confirming, react/jsx-sort-props
itself runs correctly for normal .jsx
files or mdx code blocks, right?
@JounQin Yes, they have no issues in the code block.
@u3u Please help to test:
# yarn 1
yarn add https://pkg.csb.dev/mdx-js/eslint-mdx/commit/2dbcb20a/eslint-mdx https://pkg.csb.dev/mdx-js/eslint-mdx/commit/2dbcb20a/eslint-plugin-mdx
# yarn 2, 3
yarn add eslint-mdx@https://pkg.csb.dev/mdx-js/eslint-mdx/commit/2dbcb20a/eslint-mdx/_pkg.tgz eslint-plugin-mdx@https://pkg.csb.dev/mdx-js/eslint-mdx/commit/2dbcb20a/eslint-plugin-mdx/_pkg.tgz
# npm
npm i https://pkg.csb.dev/mdx-js/eslint-mdx/commit/2dbcb20a/eslint-mdx https://pkg.csb.dev/mdx-js/eslint-mdx/commit/2dbcb20a/eslint-plugin-mdx
v2.2.1 has already been released.
Thanks!
Initial checklist
Affected packages and versions
2.2.0
Link to runnable example
No response
Steps to reproduce
Clone this repository u3u/eslint-config, and input the above content in any mdx file to reproduce.
Expected behavior
Keep consistent with
mdx/code-blocks
.Actual behavior
<span>test</span>
Regarded as an empty tag self-closing, it will be fixed to<span />
, directly losing the content.Runtime
Node v20
Package manager
pnpm
OS
macOS
Build and bundle tools
esbuild