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
Analysis rule
angular:type-safety.Detects four categories of type safety violations across all TypeScript code:
anytypes on properties, parameters, and return typesnull/undefined/[]initializers, untyped calls)Scope:
FunctionDeclarationnodes and classMethodDeclarationnodesParameterandPropertyDeclarationdescendants.d.tsdeclaration files entirelyKnown Limitations:
const fn = () => {}) and function expressions are NOT scanned for missing return types. OnlyFunctionDeclarationandMethodDeclarationare analyzed. This is intentional to keep the rule focused on explicit declarations.Overlap with
MissingReturnTypeRule:MissingReturnTypeRuleis Angular-specific: it skips Angular lifecycle hooks (ngOnInit, ngOnDestroy, etc.) and reports under the Angular framework lens.TypeSafetyAnalysisRuleis general TypeScript type safety: no lifecycle hook skipping, broader scope including standalone functions.Example