-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mdx/code-blocks doesn't respect eslint-disable from outside of the block #534
Comments
I can imagine that's because @btmills Is that possible to support jsx style comments for |
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 EDIT: Also, it doesn't work in overrides. This doesn't work:
but this does:
AFAICT the code block isn't being treated as part of the md/mdx file it's in. |
Code blocks are matched via |
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
Whereas this is correctly ignoring the linting error.
Expected behavior
Both should correctly suppress the linting error.
Actual behavior
Only
eslint-disable
s inside the block suppress the error. This means that theeslint-disable
comment is visible inside the codeblock.I've searched through issues and haven't found anything directly related to this, but given the response here this might be something from a dependency - if someone can confirm this, I'm happy to raise it there alternatively.
Runtime
Node v20
Package manager
yarn v1
OS
macOS
Build and bundle tools
Docusaurus
The text was updated successfully, but these errors were encountered: