Closed JounQin closed 4 years ago
Because there is no empty line in AST, so after combined into single jsx node, the jsx code actually used by ESLint parser is like following:
<div style={{ color: 'white', backgroundColor: 'black', padding: '24px 32px' }}><a
style={{
color: 'white',
textDecoration: 'none',
fontWeight: 'bold',
fontSize: 32
}}
href="https://blacklivesmatters.carrd.co/"
>
#BlackLivesMatter →
</a></div>
What makes the ESLint AST different with the actual code.
cc @wooorm
Yeah, MDX@1 doesn’t like blank lines. That’s the issue, right?. This is something MDX@2 will do very differently, and I believe much better, though?
I found a way to skip using node.value
instead.
https://github.com/mdx-js/eslint-mdx/pull/218/files#diff-d1b4b2537d369552aca7acbfd12a8d70R29