Skip to content

feat(eslint-config)!: change return-await rule to always enforce usage#200

Open
CptSchnitz wants to merge 1 commit into
masterfrom
return-await-always
Open

feat(eslint-config)!: change return-await rule to always enforce usage#200
CptSchnitz wants to merge 1 commit into
masterfrom
return-await-always

Conversation

@CptSchnitz
Copy link
Copy Markdown
Collaborator

@CptSchnitz CptSchnitz commented May 17, 2026

Changes:
Updates the central ESLint configuration file to enforce "@typescript-eslint/return-await": "always".

Why:
Zero-cost async stack traces: We get full, accurate stack traces when a returned promise rejects.

Prevents try/catch bugs: Eliminates the trap where a developer wraps a return promise in a try/catch, but the catch fails to fire because the promise wasn't awaited.

No performance penalty: Modern V8 natively handles return await without the historical microtask overhead.

⚠️ BREAKING CHANGE ⚠️
Consuming projects will see linting errors for any un-awaited promises returned from async functions. These can be safely auto-resolved by running eslint --fix on the consuming codebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants