'es-lint rule for unnecessary async
Is there an es-lint rule that will help catch unnecessary "asyncs"?
I want lint to yell or autocorrect from
it('true should be true', async () => {
expect(true).toEqual(true)
});
to
it('true should be true', () => {
expect(true).toEqual(true)
});
Solution 1:[1]
Yes, the require-await rule does this.
require-awaitDisallows
asyncfunctions which have noawaitexpression.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | T.J. Crowder |
