Optionallayers: LayerConfig[]Layer topology in effect (empty disables the rule)
Optionaloptions: ContentPlacementOptionsPlacement map and project root
ReadonlycategoryRule category for grouping.
ReadonlydescriptionRule description explaining what it checks.
ReadonlyidUnique rule identifier (scoped to plugin). Format: "plugin-name:rule-name" (e.g., "angular-standalone:component-not-standalone")
ReadonlynameHuman-readable rule name.
ReadonlyseverityRule severity level.
ReadonlytagsTags for filtering and search.
Analyze a source file and return findings.
Analysis context with file, project, and API access
Promise resolving to array of analysis results
Content Placement Rule (
architecture:content-placement) - validates file placement against the layer topology.Checks that services, components, guards, interceptors, directives, pipes, models and utilities live in a layer allowed for their content type. Layer membership comes from
layers/layersSource(never from folder names), the allowed layers per content type fromrules['architecture:content-placement'].placement(layer names or aliases). Without either the rule reports nothing. Barrel files (index.ts,public-api.ts,exports.ts), specs, tests, config and declaration files are skipped. Paths are anchored atconfig.projectRoot, else the plugin's project root, else the directory of the loaded tsconfig.Result metadata: ContentPlacementMetadata.
Example