no-misused-promises
Configuration
rslint.config.ts
Rule Details
Disallows Promises in places that are not designed to handle them. This rule catches common mistakes such as using a Promise in a conditional check (where it always evaluates to truthy), passing an async function as a callback where a void return is expected, spreading a Promise in an object, or returning a Promise-returning function where a void return is expected. The rule checks conditionals, void returns (arguments, properties, variables, inherited methods, attributes, and return statements), and object spreads.
Examples of incorrect code for this rule:
Examples of correct code for this rule: