Closed
Description
{
'@typescript-eslint/promise-function-async': [
'error',
{
allowAny: true
}
]
}
type Return = NodeJS.ReadableStream | Promise;
const promiseOrStream = (options: Options): Return => options.stream ? asStream(options) : asPromise(options);
Expected Result
I expected it to not report as adding an async
keyword there will not work.
Actual Result
It reports.
Additional Info
It should only report when the return value is a Promise
.
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
2.3.1 |
@typescript-eslint/parser |
2.3.1 |
TypeScript |
3.6.3 |
ESLint |
6.4.0 |
node |
12.10.0 |
npm |
6.11.3 |