-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Question&Bug: Does not work well with preset styles #182
Comments
Please provide a runnable online reproduction, I don't use CRA personally. And the report should reference a specific eslint rule, which I think is actually not part of eslint-mdx at all. |
@onichandame this is coming from from the airbnb preset
in your eslint config. |
Please see https://codesandbox.io/s/lingering-bush-7o3cn. Basically I ran Now if you run Standardhttps://codesandbox.io/s/holy-fast-734lf The problem when Airbnb style is chosen is described in my initial post, a re-production can be easily made. If you need a reproduction for this please give me a shout. |
@ChristianMurphy Thanks! One problem solved. Sadly others remain. https://codesandbox.io/s/vigilant-elion-urmpf |
I didn't run codebox actually, but the key problem is So you can try to locate Or, you can use |
And please provide what are the specific error outputs exactly... You comments maybe not so helpful to locate your real problems. |
@JounQin Thanks but none of your suggestions worked. https://codesandbox.io/s/lingering-bush-7o3cn has been updated according to your advice.
Steps to Reproduce
OutputExpected: No error Seen:
|
@onichandame OK, I just open an issue and track it at #183. There is no workaround for this issue temporarily, you can disable ESLint rule {
"overrides": [
{
"files": ".mdx",
"rules": {
"semi": 0
}
}
]
} |
Not Working with Preset Styles
when initiates eslint with one of the preset styles: google, standard or airbnb, eslint-mdx seems to conflict with the preset style.
Your environment
Steps to reproduce:
choose one of
Standard
,Airbnb
,Google
style during initiation process.4. add mdx to config
Now create a valid mdx file with import and jsx syntax and run eslint on the file.
Some weird errors are reported. It seems like something other than eslint-mdx is linting the mdx file.
Expected behaviour
no error is reported as the mdx is valid.
Actual behaviour
some weird errors are reported. The error reported is different for different preset style. Just to give an example, when the Airbnb style is chosen,
5:1 error JSX not allowed in files with extension '.mdx'
is reported.Note
When the style part in the config file is removed,
The problem disappeared. Therefore I guess that it's the conflict between the preset style and eslint-mdx that causes the problem.
This must be a very common scenario as all the steps follow the recommendation of eslint and eslint-mdx. But I cannot find a similar question on Google or StackOverflow. This might be helpful to others encountering the very problem in the future.
The text was updated successfully, but these errors were encountered: