Closed frankandrobot closed 2 years ago
A minimal reproduction is required.
I don't understand. You have a config, plus a failing mdx file. What more do you need
On Jun 26, 2022 6:21 PM, JounQin @.***> wrote:
A minimal reproduction is required.
— Reply to this email directly, view it on GitHubhttps://github.com/mdx-js/eslint-mdx/issues/403#issuecomment-1166675836, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAGAGMOAI4U2KOIB4UDYX6TVRDQXNANCNFSM5Z4VRNQQ. You are receiving this because you authored the thread.Message ID: @.***>
Please remember, we're using our free time to support OSS, a minimal reproduction is a basic respect for us so that we don't waste time to reproduce.
A GitHub repository or fork this repository and PR with a failing test will save time both of us.
Like https://github.com/privatenumber/get-tsconfig/pull/19, you can add a test case at https://github.com/mdx-js/eslint-mdx/tree/master/test/fixtures
If it can't be reproduced this way, then a GitHub repository minimal reproduction is required.
close for now, feel free to comment if you provide reproduction correctly.
I do get the same error: Parsing error: visit is not a function eslint
Again, please provide a runnable reproduction instead of just screenshots. That doesn’t help anything.
Just guessing, it should be related to different version of unist-util-visit
installed, it can be added into package.json
.
workaround yarn add -D unist-util-visit vfile
I'll raise a PR to fix it soon.
Please try for testing ci.codesandbox.io/status/mdx-js/eslint-mdx/pr/405/builds/265745
I can confirm it's working as expected now:
gitpod /workspace/eslint-mdx-visit-issue (main) $ yarn add -D https://pkg.csb.dev/mdx-js/eslint-mdx/commit/98013f6e/eslint-plugin-mdx
gitpod /workspace/eslint-mdx-visit-issue (main) $ yarn lint
yarn run v1.22.19
$ eslint --ext .ts,.tsx,.js,.jsx,.mdx src
/workspace/eslint-mdx-visit-issue/src/App.tsx
1:10 warning 'useState' is defined but never used @typescript-eslint/no-unused-vars
5:5 error 'React' must be in scope when using JSX react/react-in-jsx-scope
6:7 error 'React' must be in scope when using JSX react/react-in-jsx-scope
7:9 error 'React' must be in scope when using JSX react/react-in-jsx-scope
/workspace/eslint-mdx-visit-issue/src/stories/Button.stories.mdx
1:24 warning 'Story' is defined but never used @typescript-eslint/no-unused-vars
✖ 5 problems (3 errors, 2 warnings)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
gitpod /workspace/eslint-mdx-visit-issue (main) $
What's the workaround @JounQin ? When I try to install vifile
, yarn says that package doesn't exist :-)
Update: BTW, when I yarn install the build, still getting the same error.
What's the workaround @JounQin ? When I try to install
vifile
, yarn says that package doesn't exist :-)Update: BTW, when I yarn install the build, still getting the same error.
Sorry, it's vfile
.
And a new temporary fixed version of eslint-plugin-mdx
is
yarn add https://pkg.csb.dev/mdx-js/eslint-mdx/commit/98013f6e/eslint-plugin-mdx
See https://ci.codesandbox.io/status/mdx-js/eslint-mdx/pr/405/builds/265745 for more installation details for other npm clients.
Initial checklist
Affected packages and versions
2.0.0
Link to runnable example
No response
Steps to reproduce
The following sample file fails to lint:
eslint config:
Expected behavior
Actual behavior
environment
Runtime
Node v16
Package manager
yarn v1
OS
macOS
Build and bundle tools
Next.js