Parsing Errors: Unterminated JSX contents when using details element
See original GitHub issueSubject of the issue
In VSCode, when using a details element I get the following error: “Parsing Errors: Unterminated JSX contents”.
I am pretty sure this is because of this plugin since it goes away if I remove the plugin from my ESLint config (bug then I have other errors 😉).
Here’s my ESLint config:
module.exports = {
overrides: [
{
globals: {
"props": true
},
files: ["*.mdx"],
extends: ["plugin:mdx/recommended"],
rules: {
"semi": "off",
"react/jsx-tag-spacing": "off",
"max-len": "off",
"react-hooks/rules-of-hooks": "off"
}
}
]
};
All the tags are closed. I try to paste the code but it doesn’t format well becaise it contains markdown.
The file is available here: https://github.com/gsoft-inc/sg-orbit/blob/master/packages/react-components/src/button/stories/custom-color-hover.mdx
Thank you for your help,
Patrick
Your environment
- OS: Windows 10
- Packages: “eslint”: “7.1.0”, “eslint-plugin-mdx”: “1.7.0”
- Env: node v13.11.0 yarn v1.22.4
Steps to reproduce
Tell us how to reproduce this issue. Please provide a working and simplified example.
🎉 BONUS POINTS for creating a minimal reproduction and uploading it to GitHub. This will get you the fastest support. 🎉
Expected behaviour
No error when using <details><summary>
Actual behaviour
What happens instead?
A Parsing Error
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
@JounQin it seems that both plugins are incompatible. I’ve tried to setup both with this config:
However, only errors coming from
eslint-plugin-markdown
are reported. Once I comment the line withprocessor
, only errors coming fromeslint-mdx
are reported. It seems both are incompatible.Is there anything I’m missing?
@satazor Sorry markdown
code
in jsx is not supported and not going to happen in v1, but it should be possible in v2.And I tried to fix part of this issue in #273. What means the following will be able to be parsed.