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

[attributes-order] angular input binding without brackets considered as attribute binding #1729

Open
2 tasks done
joeldhenry opened this issue Mar 14, 2024 · 1 comment
Open
2 tasks done
Labels
package: eslint-plugin-template Angular Template rules triage This issue needs to be looked at and categorized by a maintainer

Comments

@joeldhenry
Copy link

joeldhenry commented Mar 14, 2024

Description and reproduction of the issue
a bug with template lint. attribute order doesnt understand what is attribute or input. angular input references such as name="title" should be ordered separately to html attributes such as class="my-object. noted a feature to consider classes as seperate ordering entity also.

{
    "@angular-eslint/template/attributes-order": [
    "error",
    {
      "alphabetical": false,
      "order": [
        ...
        "INPUT_BINDING",
        "ATTRIBUTE_BINDING",
        "CLASS"
      ]
    }
  ]
}
<ng-icon class="test" name="preview" /> <-- should error - name is angular input
<ng-icon name="preview" class="test" /> <-- good

Versions

Angular CLI: 16.1.6
Node: 18.18.0
Package Manager: npm 9.8.1
OS: darwin arm64

Angular: 16.1.7
... animations, common, compiler-cli, core, language-service
... platform-browser, platform-browser-dynamic, router

Package Version

@angular-devkit/architect 0.1601.6
@angular-devkit/build-angular 16.1.6
@angular-devkit/core 16.1.6
@angular-devkit/schematics 16.1.6
@angular/cli 16.1.6
@schematics/angular 16.1.6
rxjs 7.8.1
typescript 5.1.6
zone.js 0.13.1

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest supported version of the packages and checked my ng version output per the instructions given here.
@joeldhenry joeldhenry added package: eslint-plugin-template Angular Template rules triage This issue needs to be looked at and categorized by a maintainer labels Mar 14, 2024
@joeldhenry
Copy link
Author

similar to #1267 - but i would consider this a bug rather than a feature improvement

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