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:
- Spurious errors that result from ESLint not realizing invariant is equivalent to throw
- 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
- 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