Closed
Description
Repro
{
"rules": {
"@typescript-eslint/no-unnecessary-condition": ["error"],
}
}
function test(s: string) {
if (s === undefined) {
console.log('this will never happen')
}
}
Expected Result
It should warn about the unnecessary condition
Actual Result
It does not warn about it
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
2.19.0 |
@typescript-eslint/parser |
2.19.0 |
TypeScript |
3.7.5 |
ESLint |
6.7.2 |
node |
13.8.0 |
npm |
6.13.7 |