mdx-js / eslint-mdx

ESLint Parser/Plugin for MDX
https://npmjs.org/eslint-plugin-mdx
MIT License
263 stars 30 forks source link

eslint-plugin-mdx triggering mdx/no-unescaped-entities inside JSX #158

Closed NickyMeuleman closed 4 years ago

NickyMeuleman commented 4 years ago

Saw the

Need help? Please ask on Spectrum

and

This is not a place to ask questions. For that, go to [Spectrum]> > (https://spectrum.chat/mdx)

So asked there first.

Subject of the issue

eslint-plugin-mdx triggering mdx/no-unescaped-entities inside JSX Code_7IO2sDBmqf

Your environment

Steps to reproduce

Clone and run yarn: https://github.com/NickyMeuleman/gatsby-theme-nicky-blog.git Look at any React component in .mdx that passes a prop with a string value. Example <YouTube youTubeId="dQw4w9WgXcQ" /> https://github.com/NickyMeuleman/gatsby-theme-nicky-blog/blob/master/demo/data/posts/i-want-it-all/index.mdx#L27

Expected behaviour

No mdx/no-unescaped-entities error for the quotes in <YouTube youTubeId="dQw4w9WgXcQ" />

Actual behaviour

mdx/no-unescaped-entities error

JounQin commented 4 years ago

@NickyMeuleman You can add an empty line as workaround for now, I'll take a look ASAP.

JounQin commented 4 years ago

@NickyMeuleman Sorry for the delay, it should be fixed after #196 been merged and released.

JounQin commented 4 years ago

@NickyMeuleman Can you try v1.6.9?

NickyMeuleman commented 4 years ago

Can confirm I no longer get the error. This is a screenshot I just took in the same file image