Angular Modernizer
    Preparing search index...

    Configuration for a single architectural layer in the project layer topology. Used by the architecture:layer-boundary-violation rule.

    {
    * "name": "core",
    * "alias": "@core",
    * "paths": ["src/app/core/**"],
    * "canImportFrom": []
    * }
    interface LayerConfig {
        alias: string;
        canImportFrom: string[];
        level?: number;
        name: string;
        paths?: string[];
    }
    Index

    Properties

    alias: string

    Path alias prefix for this layer (as declared in tsconfig.json paths). Used to match import module specifiers to their target layer.

    '@core', '@shared', '@features'
    
    canImportFrom: string[]

    Aliases of layers that this layer is allowed to import from. An empty array means this layer must not import from any other layer.

    [], ['@core'], ['@core', '@shared']
    
    level?: number

    Position of this layer in the hierarchy (lower = more foundational). When the importing and the imported layer both have a level, an import into the same or a lower level is allowed and an import into a higher level only when that layer is listed in canImportFrom. Without levels canImportFrom is the complete list of allowed layers.

    1, 2, 3
    
    name: string

    Human-readable name for this layer.

    'core', 'shared', 'features'
    
    paths?: string[]

    Glob patterns relative to the project root that identify source files belonging to this layer. Used to determine which layer a source file belongs to when checking import violations. Strip trailing /** internally for path-contains matching.

    ['src/app/core/**', 'src/core/**']