Open rainecheck opened 3 months ago
I can imagine that's because eslint-plugin-markdown
only supports html like comments.
@btmills Is that possible to support jsx style comments for .mdx
files? Otherwise I have to copy-paste eslint-plugin-markdown
's source codes instead which I'd like to avoid.
MDXv2 moved away from HTML comments, so anything that's using MDX as it's backing (e.g. Docusaurus) would need to support JSX comments. I'd suggest extending this to .md
files too, but there are probably other stacks out there that might need it too.
EDIT: Also, it doesn't work in overrides. This doesn't work:
overrides: [
{
files: ["**/<filename>.mdx"],
rules: {
"prefer-const": "off",
},
}
]
but this does:
overrides: [
{
files: ["**"],
rules: {
"prefer-const": "off",
},
}
]
AFAICT the code block isn't being treated as part of the md/mdx file it's in.
Code blocks are matched via **/*.mdx/*.{js,jsx,ts}
(as virtual filename).
Initial checklist
Affected packages and versions
eslint-plugin-mdx-3.1.5
Link to runnable example
No response
Steps to reproduce
The following contents report
:2 warning Unused eslint-disable directive (no problems were reported) :7 error 'deployProjectCommand' is never reassigned. Use 'const' instead prefer-const
{/ eslint-enable prefer-const /}