Skip to content

[eslint-mdx] focus on next version of mdx #1484

Answered by JounQin
JounQin asked this question in General
Discussion options

You must be logged in to vote

Additional, remark-mdx's codes are not synced to npm.

I tried to copy it locally and use it with:

const unified = require('unified')
const parse = require('remark-parse')

const mdx = require('./remark-mdx')

const doc = `
<>
  {/* MDX is awesome! */}
  <div
    // MDX is awesome!
    style={{ color: "white", backgroundColor: "black", padding: "24px 32px" }}
  ></div>
</>;
`

const processor = unified().use(parse).use(mdx).freeze()

const root = processor.parse(doc)

console.log(root)

The error is the same as above:

/Users/JounQin/Workspaces/GitHub/eslint-mdx/node_modules/micromark-extension-mdx-jsx/lib/factory-tag.js:701
    throw new VMessage(
    ^
[5:6: Unexpected character `/` (U+002…

Replies: 1 comment 15 replies

Comment options

JounQin
Mar 14, 2021
Collaborator Author

You must be logged in to vote
15 replies
@JounQin
Comment options

JounQin Mar 16, 2021
Collaborator Author

@wooorm
Comment options

@JounQin
Comment options

JounQin Mar 16, 2021
Collaborator Author

@wooorm
Comment options

@JounQin
Comment options

JounQin Mar 16, 2021
Collaborator Author

Answer selected by ChristianMurphy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants