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): handle TS4.0 breaking change in TupleType #2197

Merged

Conversation

uniqueiniquity
Copy link
Contributor

@uniqueiniquity uniqueiniquity commented Jun 9, 2020

Fixes #2098.

In TypeScript 4.0, the elementTypes property of TupleType will be renamed to elements.
Here, we update our AST conversion to handle both versions and normalize to the older name to avoid breaking existing rule implementations.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @uniqueiniquity!

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. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

@bradzacher bradzacher added the bug Something isn't working label Jun 9, 2020
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.

thanks for this!

@codecov
Copy link

codecov bot commented Jun 9, 2020

Codecov Report

Merging #2197 into master will decrease coverage by 0.02%.
The diff coverage is 33.33%.

@@            Coverage Diff             @@
##           master    #2197      +/-   ##
==========================================
- Coverage   93.42%   93.40%   -0.03%     
==========================================
  Files         173      173              
  Lines        7862     7864       +2     
  Branches     2243     2243              
==========================================
  Hits         7345     7345              
- Misses        245      246       +1     
- Partials      272      273       +1     
Flag Coverage Δ
#unittest 93.40% <33.33%> (-0.03%) ⬇️
Impacted Files Coverage Δ
packages/typescript-estree/src/convert.ts 98.61% <33.33%> (-0.28%) ⬇️

@bradzacher bradzacher changed the title fix(typescript-estree): handle breaking change in TupleType fix(typescript-estree): handle TS4.0 breaking change in TupleType Jun 9, 2020
@bradzacher bradzacher merged commit 5d68129 into typescript-eslint:master Jun 9, 2020
@uniqueiniquity uniqueiniquity deleted the tupleTypeBreakingChange branch June 9, 2020 20:00
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parsing error: Cannot read property 'map' of undefined
2 participants