mdx-js / eslint-mdx

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

fix: restore first level jsx AST and tokens #394

Closed JounQin closed 2 years ago

JounQin commented 2 years ago

close #384

codesandbox-ci[bot] commented 2 years ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

codecov-commenter commented 2 years ago

Codecov Report

Merging #394 (46fd62d) into master (7e59d5e) will increase coverage by 0.92%. The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           master      #394      +/-   ##
===========================================
+ Coverage   99.07%   100.00%   +0.92%     
===========================================
  Files          17        16       -1     
  Lines         217       195      -22     
  Branches       45        38       -7     
===========================================
- Hits          215       195      -20     
+ Misses          1         0       -1     
+ Partials        1         0       -1     
Impacted Files Coverage Δ
packages/eslint-mdx/src/index.ts 100.00% <ø> (ø)
packages/eslint-mdx/src/helpers.ts 100.00% <100.00%> (+3.57%) :arrow_up:
packages/eslint-mdx/src/parser.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7e59d5e...46fd62d. Read the comment docs.

JounQin commented 2 years ago

@wooorm Any time to review and draft a next release? I think it's very close to stable release for v2 now.

JounQin commented 2 years ago

If this token generation works, 👍! Might be useful to have more tests of valid JavaScript inside MDX content?

There are a lot of fixtures, maybe you can propose some test cases here?

wooorm commented 2 years ago

Yeah I was still thinking about more. Specifically MDX 2 things, mentioned in the blog post and the migration guide. Troubleshooting might be useful too: how to deal with syntax errors. You could also take some things from the micromark-extension-mdx*/mdast-util-mdx/remark-mdx packages? 🤔

wooorm commented 2 years ago

I think this is good now? Or am I missing something?

JounQin commented 2 years ago

I think this is good now? Or am I missing something?

Then I'm going to merge.

JounQin commented 2 years ago

Yeah I was still thinking about more. Specifically MDX 2 things, mentioned in the blog post and the migration guide. Troubleshooting might be useful too: how to deal with syntax errors. You could also take some things from the micromark-extension-mdx*/mdast-util-mdx/remark-mdx packages? 🤔

Drafted #395 to track.

JounQin commented 2 years ago

Ready for a new next release then. 🍺

wooorm commented 2 years ago

Released!

P.S.:

> @mdx-js/eslint@0.0.0 prepare /Users/tilde/Projects/oss/eslint-mdx
> patch-package && simple-git-hooks && yarn-deduplicate --strategy fewer || exit 0

patch-package 6.4.7
Applying patches...
No patch files found