Husband |🦮parent | ⛰️Trail Runner | OSS Software Engineer working on @emberjs.com and @warp-drive.io
👨🏼💻Senior Staff Engineer at AuditBoard, Ex @linkedin.com IsleOfCode
the rule being discussed is require-await which says you cannot use the keyword async to make a function or method async when it could otherwise be sync
the rule being discussed is require-await which says you cannot use the keyword async to make a function or method async when it could otherwise be sync
- Promise.try(fn)
- Promise.resolve().then(fn)
- new Promise(resolve => resolve(fn()))
Which are all common patterns cleaned up by and made far safer by just using async as it was intended
- Promise.try(fn)
- Promise.resolve().then(fn)
- new Promise(resolve => resolve(fn()))
Which are all common patterns cleaned up by and made far safer by just using async as it was intended