Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(eslint-plugin): Check 'rest' parameters in no-misused-promises
Fixes #4015 This extends 'no-misued-promises' with support for checking variadic arguments passed to a 'rest' parameter. If a function is declared with an argument like '...handlers: Array<() => void>', we now check if the type argument to `Array` is a void-returning function, and if so, check if any of the variadic arguments return a Promise.
- Loading branch information
Showing
2 changed files
with
60 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters