TypeScript 3.8 and 3.9 support in SonarCloud

Our developers are using TypeScript 3.8 and are eager to try 3.9. What is the timeline to add support for TypeScript 3.8 and 3.9 syntax?

Hello @sodul,

Are you using Autoscan?

If not, it should already work (as for analysis we use TypeScript installed on your machine). As of today we do log a warning if version is newer than 3.8.0, but we do not block the analysis. So I invite you to try 3.9. If you have any problems with 3.9 (or even 3.8) please report them.

Thanks!

I’m no TypeScript developer myself so I’m not familiar with Autoscan.

We run the sonar-scanner through the sonarsource/sonarcloud-scan docker image as part of our CI process and we don’t install anything on top of it, we just feed it a clone of our repo and the results from the tests in previous stages.

Here is a snippet of code that raises typescript:S905, which I’m told is correct in TypeScript 3.8.
footerOptions?.onPrimaryActionClick(null as any);

I guess we should update our build image to include the scanner and not use the official docker image so we can ensure it has access to our full toolchain.

This FP is known issue (https://github.com/SonarSource/SonarJS/issues/1930), it should be fixed during next sprint on JS/TS analyzer.

So when I was saying “it should already work” I meant mainly parsing of code. Indeed some rules might not support new language features.

FYI here is some info about autoscan https://www.sonarcloud.io/documentation/analysis/automatic-analysis/

1 Like

Thanks for the pointer. We did not know about the Autoscan feature of SonarCloud. Since it is not compatible with CI analysis and we do want code coverage information, this is not something we will be considering.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.