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
Service Bag Analysis Rule (
architecture:service-bag) - detects services and static helper classes that mix responsibilities.Checks classes with at least 11 public methods that are services (detection confidence at least 0.7) or static-only helpers. The classification lives in the public API (
api.analysis.responsibilityClassifier): each public method gets a concern from typed signals (HTTP calls, reactive fields, DOM, file, dialog, storage, validator types), data access with its own mappers is one concern, and its backend areas come from the resolved URL of each call.Reported:
kind: 'service'/'static-utility': two or more technical concerns besides data access, one large technical concern next to data access, or two or more substantial backend areas.kind: 'domain-candidate'(severity info): several large name domains in one backend area; the decision belongs to the owner.Methods that only forward to an injected service (a split facade) and uncertain methods do not count; uncertain methods are listed with their evidence in the metadata. The split itself is done by the service bag transform in
@angular-modernizer/plugin-angular.Example