ReadonlyauthorPlugin author.
ReadonlydescriptionPlugin description.
ReadonlynameUnique plugin identifier (the npm package name).
ReadonlyversionPlugin version reported to the kernel. Fixed value, not read from package.json.
Creates the 28 analysis rules of this plugin, configured from the loaded
project configuration, and logs their IDs via console.info.
New rule instances.
Creates the 25 transform rules of this plugin.
New rule instances, among them InheritanceToCompositionRule, ServiceBagTransformRule, TypeSafetyTransformRule, AnyToInterfaceTransformRule, DtoObjectLiteralTransformRule, StaticClassTransformRule, StaticExtractTransformRule, InterfaceDuplicationTransformRule, PromiseServiceTransformRule, PromiseComponentTransformRule, PromiseCleanupTransformRule, SequentialAwaitTransformRule, MissingOutputTransformRule, SubscriptionTransformRule and LibraryExtractionTransformRule.
Get all validation rules provided by this plugin.
Empty array; this plugin has no validation rules.
Loads the project configuration (rule options and component decorator names). A configuration that cannot be loaded is ignored and the rule defaults stay in effect.
Kernel instance; provides the project root.
Plugin that registers the Angular analysis and transform rules of this package with the kernel.
Remarks
AngularPlugin.initialize loads
.angular-modernizer.jsonfrom the project root: per-rule options underrulesare passed to the rules that take a config, andparser.componentDecoratorsextends the decorator names that mark components (defaultComponent).Analysis rules (28)
angular:missing-onpush-change-detection(MissingOnPushRule)angular:performance-violation: memory leaks and performance issuesangular:lifecycle-hook-violation: improper lifecycle hook usage and missing cleanupangular:template-complexity: complex operations in templatesangular:immutable-input-violation: mutation of@Inputpropertiesangular:missing-trackby:ngForwithouttrackByangular:service-without-injectable: services without@Injectableangular:component-without-selectorangular:directive-without-selectorangular:pipe-without-nameangular:async-pipe-misuseangular:unnecessary-change-detectionangular:missing-return-type: methods without return type (skips lifecycle hooks)angular:too-many-inputsplugin-angular:rxjs-optimization(RxJSOptimizationRule)plugin-angular:bundle-size-optimization(BundleSizeOptimizationRule)plugin-angular:data-handling-strategy(DataHandlingStrategyRule)angular:type-safety(TypeSafetyAnalysisRule)angular:any-to-interface(AnyToInterfaceAnalysisRule)angular:untyped-dynamic-component(UntypedDynamicComponentRule)angular:interface-duplication(InterfaceDuplicationAnalysisRule)angular:component-wrapper-instantiation(ComponentWrapperInstantiationRule)angular:dto-direct-instantiation(DtoDirectInstantiationRule)angular:magic-string-selector(MagicStringSelectorRule)angular:static-class-detection(StaticClassAnalysisRule)angular:promise-vs-observable-anti-pattern(PromiseObservableAnalysisRule)angular:presentational-component-violation(PresentationalComponentViolationRule)angular:service-mutable-state: mutable state in servicesTransform rules (25)
Each transform rule runs only when the plugin config sets the matching
transformationType; see AngularPlugin.getTransformRules.