Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Explicitly type t.teardown() functions to return a promise This helps with the @typescript-eslint/no-misused-promises ESLint rule. * Fix typing of plugin teardown The returned method always returns Promise<void>. The teardown function itself may or may not return a promise. Support both to help with the @typescript-eslint/no-misused-promises ESLint rule.
- Loading branch information
1 parent
4257d28
commit 388ea53
Showing
4 changed files
with
17 additions
and
3 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import test from '..'; | ||
|
||
test('test', t => { | ||
t.teardown(() => {}); // eslint-disable-line @typescript-eslint/no-empty-function | ||
t.teardown(async () => {}); // eslint-disable-line @typescript-eslint/no-empty-function | ||
}); |
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