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

chore(lint): part 1 of reenabling no-floating-promises #3600

Merged
merged 8 commits into from
Nov 3, 2020

Conversation

dbjorge
Copy link
Contributor

@dbjorge dbjorge commented Nov 2, 2020

Description of changes

When we transitioned from tslint to eslint, we disabled the no-floating-promises rule due to high false positives. This PR is part 1 of working towards re-enabling it; it fixes about half the issues it catches.

It mostly does this by adding .catch(logger.error) behavior to floating cases; that essentially matches the behavior in most browsers from leaving them floating, so it shouldn't have a behavioral impact.

Pull request checklist

  • [n/a] Addresses an existing issue: #0000
  • Ran yarn fastpass
  • Added/updated relevant unit test(s) (and ran yarn test)
  • [n/a] Verified code coverage for the changes made. Check coverage report at: <rootDir>/test-results/unit/coverage
  • PR title AND final merge commit title both start with a semantic tag (fix:, chore:, feat(feature-name):, refactor:). See CONTRIBUTING.md.
  • [n/a] (UI changes only) Added screenshots/GIFs to description above
  • [n/a] (UI changes only) Verified usability with NVDA/JAWS

@dbjorge dbjorge requested a review from a team as a code owner November 2, 2020 23:23
Copy link
Contributor

@karanbirsingh karanbirsingh left a comment

Choose a reason for hiding this comment

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

Looks good overall, I commented a couple questions

@dbjorge dbjorge merged commit 8a4df13 into microsoft:master Nov 3, 2020
@dbjorge dbjorge deleted the reenable-floating-promises-1 branch November 3, 2020 20:11
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.

2 participants