Adds Eslint rule to handle promises. Closes #6005#6078
Merged
waldekmastykarz merged 1 commit intopnp:mainfrom Jul 5, 2024
Merged
Adds Eslint rule to handle promises. Closes #6005#6078waldekmastykarz merged 1 commit intopnp:mainfrom
waldekmastykarz merged 1 commit intopnp:mainfrom
Conversation
Member
|
Good catch and a great addition @Jwaegebaert. Could you check out the one conflict that we've got so that we can get this merged? |
dbfcf9b to
10ee972
Compare
waldekmastykarz
approved these changes
Jul 5, 2024
Member
waldekmastykarz
left a comment
There was a problem hiding this comment.
Perfect! Nothing to add. Awesome work 👏
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enabling this additional rule took more effort and changed more than expected.
First, to get
@typescript-eslint/no-floating-promisesworking, I updated the compiler option fromes2020toesnext.With this rule enabled, quite a few tests that never really worked or tested anything valid came to light. 😄 So, a few changes were made there too. In some cases, I couldn't find a way to solve the floating promise issue, so I added
// eslint-disable-next-line @typescript-eslint/no-floating-promises. If I missed something in those cases, I'm always open to suggestions!I'm also adding the priority flag to this PR since it’s a big change that affects the entire codebase. Any changes will likely require an intensive rebase.
Closes #6005