Closed abelepereira closed 4 years ago
Interestingly, this works for the SonarLint plug-in inside VS Code - no error is reported. However, the SonarQube analysis fails with the error Failed to parse file ... at line ... Expression expected
.
Since SonarTS 2.0 typescript code is analyzed by SonarJS (SonarTS is basically empty plugin). I will close this issue and review the problem in https://github.com/SonarSource/SonarJS/issues/1990
I want to report a bug.
SonarTS version: 2.1
Node.js version: 14
TypeScript version: 3.8.3
Rule key: typescript:S905: Expected an assignment or function call and instead saw an expression.
Reproducer
Expected behavior
Should simply understand the new (since TS v3.7) TS optional chaining operator (
?.
), and don't flag it as a bug.