Optionalconfig: Partial<ComponentWrapperInstantiationConfig>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
Detects direct
new X()instantiation of wrapper or adapter classes (identified by name patterns, explicit class names, base class inheritance, or decorator presence) in Angular codebases.Direct instantiation of component-wrapper, DTO-wrapper, or adapter classes breaks the Dependency Inversion Principle: callers take responsibility for constructing the dependency rather than receiving it through Angular's DI.
Detection scope:
classNamePatternsandexplicitClassNamesbaseClassNamesanddecoratorNamesafter import resolutionSkipped:
.d.tsdeclaration files.excludedClassNames(Angular framework Ref types by default).Example