Angular Modernizer
    Preparing search index...

    Service Architecture Rule (architecture:service-architecture) - detects architectural violations in Angular services.

    Detection patterns (violationType in the metadata):

    • service-exports-interface, service-exports-type, service-exports-enum: service files that export models (these belong in separate files)
    • too-many-dependencies: services with more than 5 constructor parameters
    // Violation: the service file also exports its model
    export interface User { id: string; }

    @Injectable({ providedIn: 'root' }) export class UserService {}

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    category: "architecture-violation" = 'architecture-violation'

    Rule category for grouping.

    description: "Detects services that export models/interfaces or have too many dependencies" = 'Detects services that export models/interfaces or have too many dependencies'

    Rule description explaining what it checks.

    id: "architecture:service-architecture" = 'architecture:service-architecture'

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

    name: "Service Architecture" = 'Service Architecture'

    Human-readable rule name.

    severity: "warning" = 'warning'

    Rule severity level.

    tags: string[] = ...

    Tags for filtering and search.

    Methods