Rule: contextual-lifecycle

Ensures that classes use allowed lifecycle method in its body.

Rationale

Some lifecycle methods can only be used in certain class types. For example, ngOnInit() method should not be used in an @Injectable class.

Notes:
TS Only

Config

Not configurable.

Examples
Schema
null