Skip to content
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

Merged

Conversation

JoshuaKGoldberg
Copy link
Member

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.

@nx-cloud
Copy link

nx-cloud bot commented Dec 24, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 052acab. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 47 targets

Sent with 💌 from NxCloud.

@typescript-eslint
Copy link
Contributor

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
Copy link

codecov bot commented Dec 24, 2022

Codecov Report

Merging #6272 (052acab) into v6 (3915661) will decrease coverage by 0.12%.
The diff coverage is 11.11%.

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              
Flag Coverage Δ
unittest 87.04% <11.11%> (-0.12%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/eslint-plugin/src/rules/no-namespace.ts 100.00% <ø> (ø)
packages/typescript-estree/src/convert.ts 28.21% <11.11%> (-0.49%) ⬇️
packages/eslint-plugin/src/rules/no-unused-vars.ts 91.81% <0.00%> (-4.10%) ⬇️

@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as ready for review December 24, 2022 05:15
@bradzacher bradzacher added bug Something isn't working breaking change This change will require a new major version to be released labels Jan 30, 2023
@bradzacher bradzacher added this to the 6.0.0 milestone Jan 30, 2023
Copy link
Member

@bradzacher bradzacher left a 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.

@bradzacher
Copy link
Member

Now that #6443 has landed in main, we'll need to merge v6 then update this PR accordingly.

@bradzacher bradzacher added the awaiting response Issues waiting for a reply from the OP or another party label Feb 13, 2023
@JoshuaKGoldberg JoshuaKGoldberg changed the title fix(typescript-estree): account for nested namespace nesting in AST conversion fix(typescript-estree): account for namespace nesting in AST conversion Feb 19, 2023
@bradzacher bradzacher removed the awaiting response Issues waiting for a reply from the OP or another party label Feb 20, 2023
Copy link
Member

@bradzacher bradzacher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all_green

@JoshuaKGoldberg JoshuaKGoldberg merged commit 09e3877 into typescript-eslint:v6 Feb 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking change This change will require a new major version to be released bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants