Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[@angular-eslint/template/no-any] does not throw error for property binding with square bracket notation #1701

Open
sunilrathore24 opened this issue Jan 19, 2024 · 0 comments
Labels
package: eslint-plugin-template Angular Template rules triage This issue needs to be looked at and categorized by a maintainer

Comments

@sunilrathore24
Copy link

Issue Description
The angular-eslint/template/no-any rule does not throw an error when used in conjunction with property binding using square bracket notation. The issue arises when using the $any expression, as demonstrated in the following example:

<div
    class="impressions__content__card trq-shadow-bottom-sm trq-p-3 trq-bg-white trq-flex-fill trq-mr-1"
    *ngIf="receivedSelected && $any(attributeList)['NPSScore'] !== null">

In this case, the rule does not detect and report the potential problem with property binding using square brackets. However, it works as expected when using direct property access, such as [name]= $any(name).

Expected Behavior
The angular-eslint/template/no-any rule should identify and report property binding with square bracket notation, especially when used in conjunction with the $any expression.

@sunilrathore24 sunilrathore24 added package: eslint-plugin-template Angular Template rules triage This issue needs to be looked at and categorized by a maintainer labels Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: eslint-plugin-template Angular Template rules triage This issue needs to be looked at and categorized by a maintainer
Projects
None yet
Development

No branches or pull requests

1 participant