promise/no-callback-in-promise
Configuration
rslint.config.ts
Disallow calling cb() inside of a then() (use util.callbackify instead).
Mixing promise callbacks (.then / .catch) with Node.js-style error-first callbacks
(cb, callback, next, done) makes control flow harder to reason about and is a
common source of swallowed errors. This rule flags places where a callback is called or
passed inside a promise handler.
Rule Details
Examples of incorrect code:
Examples of correct code:
Options
exceptions
An array of callback names to exclude from the check.
timeoutsErr
When true, passing or calling a callback inside setTimeout, setImmediate,
requestAnimationFrame, or process.nextTick that is itself inside a promise handler
is also an error. Defaults to false.
Differences from ESLint
None. The rule behaves identically to the upstream eslint-plugin-promise implementation.