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): forward compat for new compound assignment operators #2253

Merged

Conversation

rbuckton
Copy link
Contributor

This changes typescript-estree to use TypeScript API's for some of the functionality in node-utils.ts so that it will be forward compatible with TypeScript 4.0's support for ES2020's ||=, &&=, and ??= compound assignment operators.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @rbuckton!

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.

@rbuckton
Copy link
Contributor Author

Note that something like this is needed so that the TypeScript project can start using ??=. Without this, eslint rules like preferConst don't consider ??=, ||=, or &&= an assignment and result in false positives.

@codecov
Copy link

codecov bot commented Jun 24, 2020

Codecov Report

Merging #2253 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #2253      +/-   ##
==========================================
+ Coverage   93.44%   93.46%   +0.01%     
==========================================
  Files         174      174              
  Lines        7954     7953       -1     
  Branches     2282     2282              
==========================================
  Hits         7433     7433              
  Misses        246      246              
+ Partials      275      274       -1     
Flag Coverage Δ
#unittest 93.46% <100.00%> (+0.01%) ⬆️
Impacted Files Coverage Δ
packages/typescript-estree/src/node-utils.ts 96.73% <100.00%> (+0.52%) ⬆️

@bradzacher bradzacher added the bug Something isn't working label Jun 24, 2020
@uniqueiniquity uniqueiniquity merged commit ba41680 into typescript-eslint:master Jun 24, 2020
@rbuckton rbuckton deleted the newCompoundAssigment branch June 25, 2020 00:12
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 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.

3 participants