Rule: promise-function-async

Requires any function or method that returns a promise to be marked async.

Rationale

Ensures that each function is only capable of 1) returning a rejected promise, or 2) throwing an Error object. In contrast, non-async Promise-returning functions are technically capable of either. This practice removes a requirement for consuming code to handle both cases.

Notes:

Config

Not configurable.

Examples
"promise-function-async": true
Schema
null