Codelyzer: use-life-cycle-interface support for inheritance

Created on 6 Jul 2016  路  10Comments  路  Source: mgechev/codelyzer

If I have the following, would it be possible for the rule use-life-cycle-interface to not throw a lint error?

class Parent implements OnInit {
    public ngOnInit() {
    }
}

class Child extends Parent {
    public ngOnInit() {
        super.ngOnInit();
    }
}
enhancement P3

Most helpful comment

Still happening, same error with inheritance

All 10 comments

I will play with it next week. If you can do it make a PR

I don't see a good way that can be done now.

Hi @preslavsh any news here? so thanks!

Not 100% related, but I'm wondering whether other rules can take inheritance into account, too? Like the The property "xyz" that you're trying to access does not exist in the class declaration, although it exists in parent class. This is kinda annoying and the reason why I have to keep this rules disabled.

But nevermind - loloks like this particular case is described in https://github.com/mgechev/codelyzer/issues/191

Will be fixed once we merge this.

upgrading from 3.0.0-beta.4 to 3.0.0 we seem to be getting this issue again. Is it the same or it just looks very similar? - this also happened with https://github.com/mgechev/codelyzer/issues/191#issuecomment-296660455

Yes, ngast support is pushed for 4.0.0. Because of the breaking changes introduced by tslint@5 I had to push a new major release.

Still happening, same error with inheritance

This is still an issue using 4.4.4. @mgechev any suggestions?

This issue should be re-opened.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fabioemoutinho picture fabioemoutinho  路  5Comments

mattlewis92 picture mattlewis92  路  5Comments

negberts picture negberts  路  3Comments

jamesbirtles picture jamesbirtles  路  3Comments

QuentinFchx picture QuentinFchx  路  3Comments