External source for the layer topology of the
architecture:layer-boundary-violation rule.
Lets a project reuse an existing layer definition instead of duplicating it
in .angular-modernizer.json. Currently supported: the ESM config module of
an arch-validator script (export const CONFIG = { layers: { ... } }).
Mapping (arch-validator -> LayerConfig): the layer key becomes name,
paths becomes [key + '/**'], pathAlias becomes alias,
allowedImports (other layer keys) becomes canImportFrom and level
is kept.
When both layers and layersSource are set, layersSource wins and a
drift warning lists the differences.
External source for the layer topology of the
architecture:layer-boundary-violationrule.Lets a project reuse an existing layer definition instead of duplicating it in
.angular-modernizer.json. Currently supported: the ESM config module of anarch-validatorscript (export const CONFIG = { layers: { ... } }).Mapping (arch-validator -> LayerConfig): the layer key becomes
name,pathsbecomes[key + '/**'],pathAliasbecomesalias,allowedImports(other layer keys) becomescanImportFromandlevelis kept.When both
layersandlayersSourceare set,layersSourcewins and a drift warning lists the differences.Example