-
-
Notifications
You must be signed in to change notification settings - Fork 574
refactor(ast): get jsx types out of AstKind exceptions #11535
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
base: main
Are you sure you want to change the base?
refactor(ast): get jsx types out of AstKind exceptions #11535
Conversation
CodSpeed Instrumentation Performance ReportMerging #11535 will improve performances by 7.93%Comparing Summary
Benchmarks breakdown
|
Banger! Thanks so much for getting on this. It's a large PR, so will take me a while to get through reviewing it. But, on the face of it, looks great. |
Actually, it wasn't so long. I've reviewed. From what I can see, looks good. But I'm not the best person to review the linter changes as I'm not so familiar with the linter.
Note: The perf boost in Semantic I'm guessing is due to producing less @ulrichstark Just to flag please don't get your hopes up that every further step we take on adding/removing |
Not sure what's going on with the "Check links" CI fail. I've re-run it twice and it keeps failing on https://babeljs.io/docs/babel-plugin-transform-typescript, which seems to be a valid link. |
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.
linter changes look good excluding those two @overlookmotel caught
There's no need to worry about the Formatter; I've created #11511 to revamp the formatted core. I will revisit all |
@camc314 merge after oxlint 1.0 |
Just did a commit to shorten the call to get the parent node kind. The other feedback around the two instances of is_within_jsx_attribute seems to be resolved? Is more work required from my side or are we good and wait for the oxlint 1.0 release? |
nope, i don't think so. I've checked both changes and they look fine. thanks for your work on this! |
&& matches!( | ||
ctx.nodes.parent_kind(ctx.current_node_id), | ||
Some(AstKind::JSXAttribute(_) | AstKind::JSXSpreadAttribute(_)) | ||
) |
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.
Given the conversation above, shouldn't this change just be:
- && matches!(ctx.nodes.parent_kind(ctx.current_node_id), Some(AstKind::JSXAttributeItem(_)))
+ && matches!(ctx.nodes.parent_kind(ctx.current_node_id), Some(AstKind::JSXAttribute(_)))
?
This is my (not so confident) attempt to do #11490 for all jsx types.
All tests are green 🥳🎉