Angular Modernizer
    Preparing search index...

    LSP Violation Rule (solid:lsp-violation) - detects Liskov Substitution Principle violations that break substitutability.

    Detection patterns (violationType in the metadata):

    • missing-interface-method, missing-interface-property: members of an implemented interface that the class does not declare (Angular internal members starting with ɵ are ignored)
    • missing-abstract-method: abstract methods of the base class that are not implemented
    • throws-not-implemented: implementations of abstract methods whose first throw mentions NotImplemented or not implemented
    • instanceof-check, excessive-instanceof-checks: instanceof checks in methods (3 or more in one method count as excessive)
    // Violation: derived class weakens base contract
    class Bird { fly(): void {} }
    class Penguin extends Bird {
    fly(): void { throw new Error('Penguins cannot fly'); }
    }

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    category: "solid-violation" = 'solid-violation'

    Rule category for grouping.

    description: "Detects classes that violate the Liskov Substitution Principle" = 'Detects classes that violate the Liskov Substitution Principle'

    Rule description explaining what it checks.

    id: "solid:lsp-violation" = 'solid:lsp-violation'

    Unique rule identifier (scoped to plugin). Format: "plugin-name:rule-name" (e.g., "angular-standalone:component-not-standalone")

    name: "Liskov Substitution Principle Violation" = 'Liskov Substitution Principle Violation'

    Human-readable rule name.

    severity: "warning" = 'warning'

    Rule severity level.

    tags: string[] = ...

    Tags for filtering and search.

    Methods