Angular html attributes

There seems to be an issue in both sonarlint and sonarqube when it comes to Angular and attributes.
In order to bind an attribute with angular you need the prefix “attr.” in front of it but then the control thinks that the attribute is actually missing. Can we do something about this?

SonarQube version: Developer Edition
SonarLint version:

Fyi: @Rahul_Mahulkar

Hi @ganncamp, Apologies to tag you again. But you are the one who always responds.
Could you please help here? At least someone takes first look.

Rahul Mahulkar

Hello @empouras and @Rahul_Mahulkar,

Excuses for the delayed response on this.

You are right. This can lead to wrong issues in some rules.

We did add a fix some time ago to catch the []=... cases (SONARHTML-118), but did miss that there is also a syntax without the brackets. I did create SONARHTML-158 to handle this in the next release (not planned yet).

Thank you for reporting this!


1 Like

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