SonarJS icon indicating copy to clipboard operation
SonarJS copied to clipboard

Add S2933 (`prefer-readonly`) to Sonar way

Open yassin-kammoun-sonarsource opened this issue 1 year ago • 3 comments

S2933 is in Sonar way for C# but not for TypeScript.

This rule might be too noisy. It raises thousands of issues on Peach in TS.

ilia-kebets-sonarsource avatar Oct 19 '23 13:10 ilia-kebets-sonarsource

@gabriel-vivas-sonarsource WDYT about adding to the Sonar way?

ilia-kebets-sonarsource avatar Oct 19 '23 13:10 ilia-kebets-sonarsource

How would it work for JS without type annotations? Actually, I think this would be a good fit for a design/architecture rule. Or maybe I'm missing something?

Regardless, we need to be careful. I suspect this might bring up many many issues in old JS codebases. Also, the rule description would make no sense for JS, we would have to rewrite it completely.

Migrated to Jira. New ticket number: JS-73

Wohops avatar Apr 24 '24 15:04 Wohops