You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That parse error suggests that it's trying to parse the --- in the first line of the file as a -- prefix unary decrement operator. That normally wouldn't happen. Is there something in your config that might cause ESLint to parse a .mdx file as JS?
I explained a bit in MDX support #134 (comment), but I don't expect this plugin would work with MDX syntax currently since it's so different from Markdown. Based on a skim of the MDX docs, it shouldn't crash on the syntax, and in fact it shouldn't do anything. The plugin works by looking for ```js fenced code blocks, and since MDX doesn't need those, it shouldn't find any code to pass to ESLint in the first place. My guess is it should treat all the embedded JSX as regular text and ignore it like it ignores all the rest of the file outside of fenced code blocks.
I added a file association in VS Code settings from
.mdx
to.md
so that this plugin is applied to.mdx
files.When opening an
.mdx
file with frontmatter,this plugin raises the error
Any way to avoid this? Can this plugin be used with
.mdx
files?Related issues
The text was updated successfully, but these errors were encountered: