mdx-js / eslint-mdx

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

Incompatible w/ MDX v3? #480

Closed jaswrks closed 7 months ago

jaswrks commented 7 months ago

Initial checklist

Affected packages and versions

2.2.0

Link to runnable example

No response

Steps to reproduce

Parsing error: Cannot set properties of undefined (setting 'inTable') eslint

Getting this error after updating to MDX v3.

"@mdx-js/mdx": "^3.0.0",

        "eslint": "8.54.0",
        "eslint-plugin-mdx": "2.2.0",

        "remark": "^15.0.1",
        "remark-directive": "^3.0.0",
        "remark-frontmatter": "^5.0.0",
        "remark-gfm": "^4.0.0",
        "remark-lint": "^9.1.2",
        "remark-mdx-frontmatter": "^4.0.0",
        "remark-mermaidjs": "^6.0.0",
        "remark-preset-lint-recommended": "^6.1.3",
        "remark-preset-prettier": "^2.0.1",
        "remark-smartypants": "^2.0.0",
---
Foo: Bar
---

| First Header  | Second Header |
| ------------- | ------------- |
| Content Cell  | Content Cell  |
| Content Cell  | Content Cell  |

Markup on 2023-11-26 at 01:28:43

Expected behavior

ESLint works propertly using MDX v3.

Actual behavior

ESLint error:

Parsing error: Cannot set properties of undefined (setting 'inTable') eslint

Runtime

Node v19

Package manager

npm v9

OS

macOS

Build and bundle tools

Vite

JounQin commented 7 months ago

PR welcome, I think that would be very smooth by just upgrading dependencies.

jaswrks commented 7 months ago

Thanks. PR: https://github.com/mdx-js/eslint-mdx/pull/481