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
Static in Stateful Class Rule (
architecture:static-in-stateful-class) - detects classes that mix public static utility methods with instance state. Static utilities should be extracted to module-level functions.Reports non-abstract classes that have at least one public static method and at least one instance method or property. Classes with an Angular decorator (
@Component,@Injectable,@Directive,@Pipe,@NgModule) and declaration files are skipped.Result metadata: StaticInStatefulMetadata.
Example