Skip to content

[@angular-eslint/template/prefer-static-string-properties] The rule replaces where it is not needed #2265

@splincode

Description

@splincode
$ git clone https://github.com/taiga-family/taiga-ui.git && cd taiga-ui
$ npm ci
// ... add to eslint.config.ts that rule for *.html 
$ npx eslint . --fix

Before

 <code [style.color]="'var(--tui-background-accent-2-pressed)'"></code>

After

 <code color="var(--tui-background-accent-2-pressed)"></code>

Before

<input *ngSwitchCase="'boolean'" />

After

<input *ngSwitchCase="boolean" />

Before

<td *tuiCell="'name'" />

After

<td *tuiCell="name" />

Versions

package version
@angular-eslint/eslint-plugin-template 19.x
@angular-eslint/template-parser 19.x
@typescript-eslint/parser 19.x
ESLint 9.x
node 22.x
Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1602.16
@angular-devkit/build-angular   16.2.16
@angular-devkit/core            16.2.16
@angular-devkit/schematics      16.2.16
@angular/cdk                    16.2.14
@angular/cli                    16.2.16
@schematics/angular             16.2.16
ng-packagr                      16.2.3
rxjs                            7.8.2
typescript                      5.0.4
webpack                         5.98.0

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