-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix(typescript-estree): account for namespace nesting in AST conversion #6272
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(typescript-estree): account for namespace nesting in AST conversion #6272
Conversation
Thanks for the PR, @JoshuaKGoldberg! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## v6 #6272 +/- ##
==========================================
- Coverage 87.15% 87.04% -0.12%
==========================================
Files 362 362
Lines 12459 12465 +6
Branches 3688 3689 +1
==========================================
- Hits 10859 10850 -9
- Misses 1253 1268 +15
Partials 347 347
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
I do wish we could use Identifier
for the dotted name - unfortunately Identifier.name
needs to be a valid JS identifier - dots aren't allowed!
Instead we can convert this to a TSQualifiedName
which is essentially just a special limtied member expression.
Now that #6443 has landed in main, we'll need to merge v6 then update this PR accordingly. |
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.
PR Checklist
Overview
TypeScript produces a nested body AST for Identifier names like
abc.def
. This unravels their body blocks and accumulates the name if necessary.