Closed
Description
Repro
{
"rules": {
"@typescript-eslint/strict-boolean-expressions": "error"
}
}
const x: any;
if (x) {}
Expected Result
No error (at least with an option).
Actual Result
Error: Unexpected non-boolean in conditional.
Additional Info
TSLint seems to ignore any
.
Implementation choices:
- Ignore
any
always (should rather be handled by no implicit/explicit any) - Option
allowAny
, defaulting totrue
. - Option
allowAny
, defaulting tofalse
.
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
1.13.0 |
@typescript-eslint/parser |
1.13.0 |
TypeScript |
3.4.5 |
ESLint |
6.1.0 |
node |
10.16.0 |
npm |
6.9.0 |