Skip to content

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

Closed
@sunilrathore24

Description

@sunilrathore24

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: eslint-plugin-templateAngular Template rulestriageThis issue needs to be looked at and categorized by a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions