Closed as not planned
Closed as not planned
Description
Before You File a Bug Report Please Confirm You Have Done The Following...
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have searched for related issues and found none that matched my issue.
- I have read the FAQ and my problem is not listed.
Playground Link
Repro Code
declare function onError<T>(callback: () => T): void;
onError(() => console.log('oops'));
Promise.resolve(1).then(() => console.log("foo"))
ESLint Config
{
"rules": {
"@typescript-eslint/no-confusing-void-expression": [
"error",
{
"ignoreVoidReturningFunctions": true
}
]
}
}
tsconfig
No response
Expected Result
Should report both console.log
s
The correct code should be
onError((): void => console.log('oops'));
Promise.resolve(1).then((): void => console.log("foo"))
or
onError<void>(() => console.log('oops'));
Promise.resolve(1).then<void>(() => console.log("foo"))
Actual Result
Doesn't report.
Additional Info
Continued from #8538