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(ast-spec): correct AwaitExpression.argument type #4880

Merged
merged 3 commits into from May 2, 2022
Merged

fix(ast-spec): correct AwaitExpression.argument type #4880

merged 3 commits into from May 2, 2022

Conversation

ddubrava
Copy link
Contributor

PR Checklist

Overview

ImportExpression is added to LeftHandSideExpression.

@nx-cloud
Copy link

nx-cloud bot commented Apr 29, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit d66baab. 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 43 targets

Sent with 💌 from NxCloud.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @ddubrava!

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.

@netlify
Copy link

netlify bot commented Apr 29, 2022

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit d66baab
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/626c503e28118f00096d11e5
😎 Deploy Preview https://deploy-preview-4880--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@codecov
Copy link

codecov bot commented Apr 29, 2022

Codecov Report

Merging #4880 (d66baab) into main (63fbbaa) will decrease coverage by 0.70%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #4880      +/-   ##
==========================================
- Coverage   92.49%   91.78%   -0.71%     
==========================================
  Files         346      228     -118     
  Lines       11684    10633    -1051     
  Branches     3335     3290      -45     
==========================================
- Hits        10807     9760    -1047     
+ Misses        608      591      -17     
- Partials      269      282      +13     
Flag Coverage Δ
unittest 91.78% <100.00%> (-0.71%) ⬇️

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

Impacted Files Coverage Δ
...gin/src/rules/non-nullable-type-assertion-style.ts 100.00% <100.00%> (ø)
packages/utils/src/json-schema.ts 5.55% <0.00%> (-94.45%) ⬇️
packages/utils/src/ts-eslint/index.ts 11.11% <0.00%> (-88.89%) ⬇️
packages/utils/src/eslint-utils/index.ts 12.50% <0.00%> (-87.50%) ⬇️
packages/utils/src/ts-eslint-scope/index.ts 18.18% <0.00%> (-81.82%) ⬇️
packages/utils/src/ts-eslint/ParserOptions.ts 20.00% <0.00%> (-80.00%) ⬇️
packages/utils/src/ast-utils/eslint-utils/index.ts 20.00% <0.00%> (-80.00%) ⬇️
packages/utils/src/ast-utils/index.ts 25.00% <0.00%> (-75.00%) ⬇️
packages/typescript-estree/src/ts-estree/index.ts 50.00% <0.00%> (-50.00%) ⬇️
packages/eslint-plugin/src/util/astUtils.ts 83.33% <0.00%> (-5.56%) ⬇️
... and 223 more

@bradzacher
Copy link
Member

Sorry, I realised that I was very wrong when I wrote that comment. I wasn't thinking right.

Our types for AwaitExpression are very wrong.

https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/ast-spec/src/expression/AwaitExpression/spec.ts#L9

This type should just be Expression, not a custom union.

@bradzacher bradzacher added bug Something isn't working awaiting response Issues waiting for a reply from the OP or another party labels Apr 29, 2022
@ddubrava
Copy link
Contributor Author

If you prefer force pushing here let me know. as according to your contributing.md, there is a request not to force push

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.

Brilliant - thanks for fixing this!

@bradzacher bradzacher changed the title fix(ast-spec): add ImportExpression to LeftHandSideExpression type fix(ast-spec): correct AwaitExpression.argument type May 2, 2022
@bradzacher bradzacher merged commit 3ec5f53 into typescript-eslint:main May 2, 2022
@bradzacher bradzacher removed the awaiting response Issues waiting for a reply from the OP or another party label May 2, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 2, 2022
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.

AwaitExpression does not include ImportExpression as possible value of argument property
2 participants