Layer topology of the project; when it is not empty the
rule leaves import directions to architecture:layer-boundary-violation
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
Import Direction Violation Rule (
solid:import-direction-violation) - detects imports that cross conventional layer boundaries.Works without configuration: layers are inferred from path segments and tsconfig path aliases. Reports (
violationTypein the metadata):forbidden-import-pattern: built-in forbidden directions (features importing shared or core, also through relative paths; libraries importing app or feature code)layer-hierarchy: imports that go down the built-in orderapp>features>config>shared>core/lib/libs>assets/environments; imports fromapp,configandsharedare exemptAn import that matches a forbidden pattern is reported once, not also as a hierarchy violation. Layers are read from whole words of path segments and aliases. External packages and files whose layer cannot be determined are skipped.
When the project configures a layer topology (
layersorlayersSource) the rule reports nothing: the config-driven LayerBoundaryViolationRule checks the imports against it.Example