Skip to content

Conversation

Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Feb 19, 2025

When promise/always-return is enabled, you must always return a value from .then(). We sometimes use this for side effects, so I think this rule is too strict.

Blocked by #384.

@Gudahtt
Copy link
Member

Gudahtt commented Feb 19, 2025

The idea behind this rule was that most of the time, if you're not awaiting or returning a Promise, it's by accident. We can selectively ignore this rule when it's intentional. It's still worth having a guard-rail against forgetting to await or return a Promise, it's a very easy mistake to make.

@Mrtenz Mrtenz force-pushed the mrtenz/loosen-promise-rules branch from 59545e5 to 0b4fb83 Compare February 19, 2025 14:32
Base automatically changed from mrtenz/loosen-promise-rules to main February 19, 2025 14:34
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