Skip to content

Rule to require that Promise executor function calls resolve #438

Open
@jroru

Description

@jroru

Description

A rule could be created for the Promise constructor executor function to require that the resolve callback is called.

Example of incorrect code for this rule:

await new Promise(() => {
  setTimeout(() => {}, 2000);
});

Example of correct code for this rule:

await new Promise((resolve) => {
  setTimeout(resolve, 2000);
});

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions