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 (#…
…5731) * 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. * Address review comments * Fix spelling * Address additional review comments * nit: split up tests a bit, and add comments about () Co-authored-by: Josh Goldberg <git@joshuakgoldberg.com>
- Loading branch information
1 parent
7a377e4
commit 6477f38
Showing
2 changed files
with
208 additions
and
13 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