avoid-new
Configuration
rslint.config.ts
Disallow creating new promises outside of utility libs (use util.promisify instead).
Rule Details
This rule discourages using the new Promise constructor directly. When promisifying callback-based functions, prefer Node's util.promisify. When wrapping a plain value or error, prefer Promise.resolve() or Promise.reject().
Examples of incorrect code for this rule:
Examples of correct code for this rule: