Description
Repro
{
"rules": {
"no-unused-expressions": ["error", { "allowShortCircuit": true, "allowTernary": true, "allowTaggedTemplates": true }],
}
}
class Test {
test() {
}
}
declare const t: Test | undefined
t?.test()
Expected Result
Actual Result
D:\test\test.ts
6:1 error Expected an assignment or function call and instead saw an expression no-unused-expressions
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
2.5.0 |
@typescript-eslint/parser |
2.5.0 |
TypeScript |
3.7.0-dev.20191021 |
ESLint |
5.16.0 |
node |
v10.15.3 |
npm |
6.10.1 |