HomePhabricator
Diffusion Comm 120892979924

Fix ESLint issues identified by consistent-return rule

Description

Fix ESLint issues identified by consistent-return rule

Summary:
The consistent-return rule will be introduced in the next diff. This diff addresses all of the errors it identified.

They are mostly in three categories:

  1. Spurious errors that result from ESLint not realizing invariant is equivalent to throw
  2. ESLint pushing us to be more explicit with return undefined instead of return in functions where there are other return statements that aren't just return
    • In some of these cases, if the function's return didn't matter, I removed the return X statement instead of replacing return with return undefined
  3. Legitimate errors that ESLint identified
    • I will point these out with inline comments

Test Plan: In combination with the next diff, run yarn eslint:fix in the repo root and make sure there are no errors

Reviewers: atul, ginsu, tomek

Reviewed By: atul

Differential Revision: https://phab.comm.dev/D7635

Details

Provenance
ashoatAuthored on Apr 26 2023, 12:46 PM
Reviewer
atul
Differential Revision
D7635: Fix ESLint issues identified by consistent-return rule
Parents
rCOMM060ebb3b65fe: [Identity] Rename key request RPCs to reflect Olm terms
Branches
Unknown
Tags
Unknown