-
-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: restore first level jsx AST and tokens #394
Conversation
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 Report
@@ 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
Continue to review full report at Codecov.
|
|
||
const processed = new WeakSet<Node>() | ||
|
||
// TODO: merge with `tokens.ts` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will refactor later
@wooorm Any time to review and draft a next release? I think it's very close to stable release for v2 now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this token generation works, 👍!
Might be useful to have more tests of valid JavaScript inside MDX content?
packages/eslint-mdx/src/helpers.ts
Outdated
@@ -181,6 +141,82 @@ export const requirePkg = async <T>( | |||
throw error | |||
} | |||
|
|||
/* istanbul ignore next -- used in worker */ | |||
export const getPositionAt = (text: string, offset: number): Position => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vfile-location
might be useful here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe in next development schedule. I'm a bit tired today. 😂
This package is ESM only, to use it I need to do some refactor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use the previous version, but also fine without!
There are a lot of fixtures, maybe you can propose some test cases here? |
Yeah I was still thinking about more. Specifically MDX 2 things, mentioned in the blog post and the migration guide. |
I think this is good now? Or am I missing something? |
Then I'm going to merge. |
Drafted #395 to track. |
Ready for a new next release then. 🍺 |
Released! P.S.:
|
close #384