Closed chenxsan closed 3 years ago
See https://github.com/mdx-js/eslint-mdx/issues/207#issuecomment-782716731
Short answer, it can not be fixed in eslint-plugin-mdx@v1
, and I don't have time to work on v2 temporarily.
Workaround:
<!-- eslint-disable react/no-unescaped-entities -->
<div>
```js
import foo from './foo.js'
Or:
<!-- example.mdx -->
```js
import foo from './foo.js';
````mdx
<!-- index.mdx -->
import Example from './example.mdx'
<div>
<Example />
</div>
Or:
<!-- example.mdx --> ```js import foo from './foo.js';
```gfm <!-- index.mdx --> import Example from './example.mdx' <div> <Example /> </div>
Yeah, this is how I work around it at the moment.
Subject of the issue
Using
'
in javascript code block inside mdx shows an error as the title:Your environment
Steps to reproduce
yarn
to installsrc/content/index.mdx
, and append code below:Expected behaviour
No lint error.
Actual behaviour
A lint error.