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

Lint to prevent floating promises #2497

Merged
merged 41 commits into from
Jul 30, 2024
Merged

Lint to prevent floating promises #2497

merged 41 commits into from
Jul 30, 2024

Conversation

AndreasArvidsson
Copy link
Member

@AndreasArvidsson AndreasArvidsson commented Jul 12, 2024

Fixes #1984

Note that I just mechanically went through all the errors and tried to fix them. We definitely need to look at the change log and decide if we like the changes. Maybe we should add a few more if statements with throw instead of asserting not now and so on.

Checklist

  • [/] I have added tests
  • [/] I have updated the docs and cheatsheet
  • [/] I have not broken the cheatsheet

@AndreasArvidsson AndreasArvidsson requested a review from pokey as a code owner July 12, 2024 12:16
@AndreasArvidsson AndreasArvidsson requested a review from a team as a code owner July 28, 2024 18:48
Copy link
Member

@pokey pokey left a comment

Choose a reason for hiding this comment

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

most of the way through; stopping for lunch so leaving comments

@AndreasArvidsson
Copy link
Member Author

AndreasArvidsson commented Jul 30, 2024

Updated with your suggestions. Just be clear in many cases I just put void because I assume that you would be awaiting things like the tutorial if it actually was important.

@pokey
Copy link
Member

pokey commented Jul 30, 2024

Updated with your suggestions. Just be clear in many cases I just put void because I assume that you would be awaiting things like the tutorial if it actually was important.

I think in a lot of those cases it only returns a promise to allow for other IDEs; I believe VSCode just resolves immediately

Copy link
Member

@pokey pokey left a comment

Choose a reason for hiding this comment

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

Ok I installed this one locally and seems fine

@AndreasArvidsson
Copy link
Member Author

I'm also running this locally

@pokey pokey enabled auto-merge July 30, 2024 14:49
@pokey pokey force-pushed the noFloatingPromises branch from 1c9acf8 to 1486cd4 Compare July 30, 2024 15:08
@pokey pokey added this pull request to the merge queue Jul 30, 2024
Merged via the queue into main with commit 44a36e6 Jul 30, 2024
15 checks passed
@pokey pokey deleted the noFloatingPromises branch July 30, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use or explicitly ignore all promises
3 participants