Why are typescript:S3504 and javascript:S3504 are not in the Sonar way profiles

Using let or const instead of var in Javascript and Typescript would seem to be a very basic, good practice but the two rules encouraging this are not on in the Javascript and Typescript Sonar Way quality profiles (in SonarQube 8.9.7). Is there a reason for this?

1 Like

I agree we should add it. In the past it was not added because there were many projects not yet using modern JS features and we wanted the default profiles to be non-controversial, however, I think this argument doesn’t hold anymore, as using const and let is the norm nowadays.

I created the ticket to add the rule to the default profile S3504 should be part of SonarWay profile · Issue #3101 · SonarSource/SonarJS · GitHub