-
Notifications
You must be signed in to change notification settings - Fork 3.9k
remove return statement from console.log #327
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
Conversation
causes compilation failure when using typescript
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
i signed it |
CLAs look good, thanks! |
@tavelli Could you tell us a little more about the error that you are seeing with Typescript? (e.g. could you paste the error here?) We added an ESLint rule to all projects that makes having a return statement inside promises mandatory to avoid some common errors that developer face when writing these return promises (e.g. forgetting to return a Promise or a chained/sub promise). cc/ @inlined @tinaliang |
FYI we added this as part of #306 |
@nicolasgarnier my bad i's actually tslint error not compile error, but it will cause deploy firebase deploy to fail if using default tslint config created during firebase init. the lint error is: so it can also resolved by just moving return statement onto separate line after the console.log
|
or maybe log and return null similar to other statements above it? may also be good to catch and log in case of an error
|
That looks good to me. I'd also accept inlined expressions as well (they're exempt from the always-return linter rule):
As some minor other fixes from my sample: always print your errors and print them to stderr. |
I just added the Thanks @tavelli ! |
Thanks! |
causes compilation failure when using typescript