Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix!: only require
await
ing promises returned from inside try/catch…
… blocks (#133) Returning unawaited promises from inside try/catch blocks is usually a bug as the author more than likely intends the catch part to handle errors. The configuration in this PR disallows `await` before `return` unless it is inside a `try/catch` in which case it is required. `await` before `return` doesn't cause any harm but I don't think we can configure the rule any other way. This is a breaking change but one that is fixable with `npm run lint -- --fix` Fixes: #130 BREAKING CHANGE: `await` is not allowed before `return` unless it is inside a `try/catch` in which case it is required Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com>
- Loading branch information