SonarTS Profiles contain way fewer rules than JS…should I analyze my dist/ folders?

A number of important rules do not appear to be provided in the typescript quality profile, but do exist in the javascript profile. That would be fine if they were caught by the typescript compiler, but many are not. Examples:

  • Conditionally executed blocks should be reachable (javascript:S2583)
  • Collection sizes and array length comparisons should make sense (javascript:S3981)

I could catch this sort of thing by scanning the compiled javascript code, but that seems less than ideal as we would then have to find and fix it in the the typescript source. Is there a better solution that I’m missing here?

First rule you mention in based on symbolic execution which we don’t have in TS (in fact we have it, but it’s pretty weak, and development is frozen there).
The second rule (S3981) in fact exists in typescript analyzer from the first version (see at rules)