Skip to content

[@angular-eslint/use-lifecycle-interface] --fix adds interface at wrong position #1901

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

Closed
phihochzwei opened this issue Jun 30, 2024 · 0 comments
Labels
package: eslint-plugin Angular-specific TypeScript rules triage This issue needs to be looked at and categorized by a maintainer

Comments

@phihochzwei
Copy link

phihochzwei commented Jun 30, 2024

Description and reproduction of the issue

When running eslint with the --fix param, he finds some files in our project which extend from a parent class. When trying to add the lifecycle interface, he adds it BEFORE the extension creating something like this

export class SpacerComponent implements OnInit extends AbstractCMSComponent {
}

which then breaks the project.

Versions

package version
@angular-eslint/eslint-plugin 18.0.1
@typescript-eslint/parser 18.0.1
ESLint 8.57.0
node 22.2.0
# Please run `npx ng version` in your project and paste the full output here:
Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1800.5
@angular-devkit/build-angular   18.0.5
@angular-devkit/core            18.0.5
@angular-devkit/schematics      18.0.5
@angular/cli                    18.0.3
@angular/google-maps            18.0.3
@angular/ssr                    18.0.5
@schematics/angular             18.0.5
ng-packagr                      18.0.0
rxjs                            7.5.7
typescript                      5.4.3
webpack                         5.91.0
zone.js                         0.14.3

  • [ X] I have tried restarting my IDE and the issue persists.
  • [ X] I have updated to the latest supported version of the packages and checked my ng version output per the instructions given here.
@phihochzwei phihochzwei added package: eslint-plugin Angular-specific TypeScript rules triage This issue needs to be looked at and categorized by a maintainer labels Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: eslint-plugin Angular-specific TypeScript rules triage This issue needs to be looked at and categorized by a maintainer
Projects
None yet
Development

No branches or pull requests

2 participants