Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Closed
@phihochzwei

Description

@phihochzwei

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: eslint-pluginAngular-specific TypeScript 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