Closed tmpduarte closed 1 year ago
Thanks for reproduction, I'll check later.
See https://github.com/tmpduarte/eslint-mdx-visit-issue/pull/1
eslint-plugin-mdx@2.0.0
, but you tricked to say the affected version was 2.0.2
@wooorm Do you have any idea that how can we ensure same acorn
and acorn-jsx
versions between eslint-mdx
vs micromark-extension-mdxjs? Will an optional peer dependency declaration of micromark-extension-mdxjs
work?
Because acorn.tokTypes
and acornJsx.tokTypes
are different between versions.
micromark-extension-mdxjs
takes acorn
as an instance: https://github.com/micromark/micromark-extension-mdxjs#optionsacorn. You can pass an instance of the version you use.
@wooorm If I didn't remember wrong, micromark-extension-mdxjs
is referenced from remark-mdx
, but remark-mdx
doesn't provide an acorn
/acornJsx
options.
And it accepts options. You can pass the acorn version you want.
https://github.com/mdx-js/mdx/blob/main/packages/remark-mdx/index.js https://github.com/micromark/micromark-extension-mdxjs/blob/main/index.js
OK then, I think I can give it a try tonight. Thanks!
@JounQin thank you very much for taking a look a this 🙏
There might have been a confusion.
The link I posted on the description is for a specific branch that has the version 2.0.2
as well as the MUI button in the storybook story, and that's where the problem happens.
The main branch, used to replicate the problem actually has not problem at all. Sorry for the confusion 🙏
I'm also getting this with version 2.0.3, node v16.13.2 and pnpm v7.9.5
I'm also getting this with version 2.0.3, node v16.13.2 and pnpm v7.9.5
Please provide a minimal but runnable reproduction in a new issue then.
I've opened up #429 as a continuation of this issue with a repro / failing test.
Initial checklist
Affected packages and versions
2.0.2
Link to runnable example
https://github.com/tmpduarte/eslint-mdx-visit-issue/tree/issue/expected-value-to-be-truthy
Steps to reproduce
Minimal Example
Minimal repository producing this issue with a fresh Vite / TypeScript / React / Storybook / MUI project.
Steps taken Forked this repository, added the setup needed to use MUI and updated the eslint-mdx to the latest version.
kudos to @sudosilico for the setup 🙏
Expected behavior
.mdx
file should should be linted without parsing errors.Actual behavior
Runtime
Node v16
Package manager
yarn v1
OS
macOS
Build and bundle tools
Vite