Skip to content
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

[feat] react-x/jsx-uses-vars for MDX and other non-TS envs #834

Closed
karlhorky opened this issue Oct 7, 2024 · 1 comment
Closed

[feat] react-x/jsx-uses-vars for MDX and other non-TS envs #834

karlhorky opened this issue Oct 7, 2024 · 1 comment

Comments

@karlhorky
Copy link
Contributor

karlhorky commented Oct 7, 2024

Describe the problem

Similar to #846

Originally reported in #85 (comment)

I ran into an issue today that eslint-plugin-mdx requires react/jsx-uses-vars

There is not yet full TypeScript support for MDX files, and it appears ESLint doesn't support multiple parsers for a set of files (eg. for trying to use typescript-eslint parser along with the MDX parser).

I tried to use eslint-plugin-react-x for this (looking for react-x/jsx-uses-vars) and found this part of the #85 issue description:

The following can be enforced by TypeScript, no need to implement them

  • react/jsx-uses-vars

Describe the solution you'd like

What do you think about implementing react-x/jsx-uses-vars for other languages like MDX? (and also just for completeness, for other situations where TypeScript cannot be used)

Alternatives considered

Keep using react/jsx-uses-vars via eslint-plugin-react

Additional context

--

@karlhorky
Copy link
Contributor Author

@Rel1cx thanks, confirmed that react-x/jsx-uses-vars works 🎉 (also with MDX files)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant