The following generates a warning when no-unused-expressions is on:
const response = funcThatReturnsAPromise();
await response; // no-unused-expressions warning
Thanks!
I'm seeing this issue with babel-eslint v7.0.0, v7.2.0 and v7.2.1 - is there any special configuration needed to apply fix?
On http://eslint.org/demo/ this warning doesn't trigger, so this does appear to be a problem with babel-eslint.
I just ran into this as well. I have a lot of Selenium tests that have code similar to this:
await driver.actions().mouseMove(element).perform();
Agreed that this linting rule shouldn't warn for await. Or it should offer an appropriate configuration option.
Thank you for the issue. Now that @babel/eslint-parser has been released, we are making this repository read-only. If this is a change you would still like to advocate for, please reopen this in the babel/babel monorepo.
Most helpful comment
I'm seeing this issue with babel-eslint v7.0.0, v7.2.0 and v7.2.1 - is there any special configuration needed to apply fix?