Angular Modernizer
    Preparing search index...

    Analysis rule angular:presentational-component-violation: reports components that should be presentational but contain business logic, service dependencies or state management. Presentational components render UI and leave business logic to their container components, communicating through inputs and outputs.

    Detection targets:

    1. Business service dependencies injected via constructor or inject().
    2. .subscribe() calls in lifecycle hooks without takeUntilDestroyed.
    3. Methods calling services without a matching @Output or output().
    4. Business logic methods (name keyword plus more than 3 branching tokens).
    5. Complex local state (arrays, Maps, Sets in 3 or more non-input properties).

    Dialog components (see DialogDetectionConfig) are skipped.

    const rule = new PresentationalComponentViolationRule();
    const violations = await rule.analyze(context);
    // violations contain service-dependency, subscription-in-lifecycle,
    // missing-output, business-logic, complex-state-management entries

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    category: "angular-architecture" = 'angular-architecture'

    Rule category for grouping.

    description: "Detects components that should be presentational but contain service dependencies, business logic, or complex state management" = 'Detects components that should be presentational but contain service dependencies, business logic, or complex state management'

    Rule description explaining what it checks.

    id: "angular:presentational-component-violation" = 'angular:presentational-component-violation'

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

    name: "Presentational Component Violation" = 'Presentational Component Violation'

    Human-readable rule name.

    severity: "warning" = ...

    Rule severity level.

    tags: string[] = ...

    Tags for filtering and search.

    Methods