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

eslint-plugin-mdx@1.9.0 does not work with @typescript-eslint/parser@4.15.2 #277

Closed
iAdramelk opened this issue Mar 1, 2021 · 3 comments
Labels
📚 area/docs This affects documentation 🙋 no/question This does not need any changes

Comments

@iAdramelk
Copy link

Judging by this part of the README I assume that eslint-plugin-mdx should work with the @typescript-eslint/parser.

I use the following versions of the libraries:

  • @typescript-eslint/parser – 4.15.2.
  • eslint – 7.21.0.
  • eslint-plugin-mdx – 1.9.0.
  • eslint-plugin-react – 7.22.0. (Without this plugin I'm getting error Definition for rule 'react/jsx-no-undef' was not found).

With this config:

module.exports = {
  parser: "@typescript-eslint/parser",
  extends: ["plugin:react/recommended", "plugin:mdx/recommended"],
  settings: {
    react: {
      version: "detect",
    },
  },
};

Then I run console command for one file:

yarn eslint 'path-to-file.mdx'

I'm getting this error in the CLI:

1:2  error  Parsing error: Expression expected

But then I remove parser: "@typescript-eslint/parser", from the config it works as expected.

@iAdramelk iAdramelk added 🐛 type/bug This is a problem 🙉 open/needs-info This needs some more info labels Mar 1, 2021
@JounQin
Copy link
Member

JounQin commented Mar 1, 2021

#251 (comment)

@JounQin JounQin closed this as completed Mar 1, 2021
@JounQin JounQin added 📚 area/docs This affects documentation 🙋 no/question This does not need any changes and removed 🐛 type/bug This is a problem 🙉 open/needs-info This needs some more info labels Mar 1, 2021
@JounQin
Copy link
Member

JounQin commented Mar 1, 2021

By the way, PR welcome to improve the document.

@iAdramelk
Copy link
Author

Understood, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 area/docs This affects documentation 🙋 no/question This does not need any changes
Development

No branches or pull requests

2 participants