Skip to content
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

Turn off no-return-await #74

Merged
merged 2 commits into from
Mar 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/wicked-socks-collect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'eslint-config-seek': minor
---

Turn off [`no-return-await`](https://eslint.org/docs/rules/no-return-await)

`return await` produces [richer stack traces with a marginal performance penalty](https://github.com/goldbergyoni/nodebestpractices/blob/master@%7B2022-01-01T00:00:00Z%7D/sections/errorhandling/returningpromises.md) in recent Node.js versions. This tradeoff is now left to individual consumers to weigh up and optionally enforce.
5 changes: 4 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ const baseRules = {
'prefer-const': ERROR,
'prefer-spread': ERROR,
'prefer-template': ERROR,
'no-return-await': ERROR,
// Allow devs to choose between performance and richer stack traces
// https://eslint.org/docs/rules/no-return-await#when-not-to-use-it
// https://github.com/goldbergyoni/nodebestpractices/blob/master@%7B2022-01-01T00:00:00Z%7D/sections/errorhandling/returningpromises.md
'no-return-await': OFF,
};

const reactRules = {
Expand Down