EddieHubCommunity / api

API to manage our community data
https://api.eddiehub.io
MIT License
68 stars 65 forks source link

fix: remove 'return await' to improve performance #293

Closed jameslieu closed 2 years ago

jameslieu commented 2 years ago

Fixes Issue

Closes https://github.com/EddieHubCommunity/api/issues/292

Check List (Check all the applicable boxes)

eddiejaoude commented 2 years ago

This is really interesting James, I did not know this!

https://eslint.org/docs/latest/rules/no-return-await

You can avoid the extra microtask by not awaiting the return value, with the trade off of the function no longer being a part of the stack trace if an error is thrown asynchronously from the Promise being returned. This can make debugging more difficult.

My concern is, it makes debugging more difficult, which I would prefer to avoid