PhpStorm 2020.3 Help

Code Inspections in Angular

This topic lists all PhpStorm code inspections available in Angular.

You can toggle specific inspections or change their severity level on the Editor | Inspections page of the Settings/Preferences Ctrl+Alt+S.

InspectionDescriptionDefault Severity
Ambiguous component tag

Warns if components are matched on an embedded template element <ng-template>, or if more than one component is matched on any other element.

Error Error
Angular CLI add dependency

Suggests using 'ng add' command to install the dependency.

'ng add' will use the package manager to download it and invoke a schematic which can update your project with configuration changes, add additional dependencies (e.g. polyfills), or scaffold package-specific initialization code.

Warning Warning
Content inside <ng-content> tag

Checks that the <ng-content> tag used for content projection doesn’t have any text or other tags in it.

Error Error
Inaccessible component member in AOT mode

Warns if component's private or protected members are accessed from its template. Such usages causes AOT compilation to fail.

Warning Warning
Incorrect component template definition

Warns if a component doesn’t have an associated template or uses both template and templateUrl properties.

Error Error
Insecure binding to event

Reports bindings to the event properties or attributes, e.g. [onclick] or [attr.onclick] instead of (click).

Warning Warning
Invalid animation trigger assignment

Warns about the invalid assignment of the animation trigger. To attach an animation to an element, use [@triggerName]="expression" or an attribute without a value @triggerName.

Error Error
Invalid entry component

Checks that a valid Angular component is specified in the module’s bootstrap or entryComponents property.

Error Error
Invalid expression result type

Reports incorrect return type of an Angular binding expression.

Warning Warning
Invalid i18n attribute

Reports problems with i18n-* attributes.

Warning Warning
Invalid imported or declared symbol

Reports any symbols that are declared, imported or exported by an Angular module that are not modules, components, directives or pipes or can’t be used in the context of the property.

Error Error
Missing event handler

Warns about a missing event handler statement for an event binding.

Error Error
Missing or invalid component, directive or pipe declaration in a module

Warns about Angular components, directives or pipes that are not declared in any module or declared in multiple modules.

Error Error
Missing or invalid selector

Validates a component or directive selector property.

Error Error
Multiple structural directives on one element

Reports the usage of multiple structural directives (*ngIf, *ngFor, etc) on one element.

Error Error
Recursive import or export of Angular module

Reports cyclic dependencies between Angular modules.

Error Error
Unbound or ambiguous template reference variable

Warns about a template reference variable that is not assigned to a directive when using exportAs or is assigned to multiple directives.

Error Error
Undefined binding

Reports undefined property, event or structural directive bindings on elements.

Error Error
Undefined export from Angular module

Reports exports of undeclared or unimported components, directives and pipes from an Angular module.

Error Error
Undefined tag

Reports tags, which are defined by components or directives out of current scope.

Error Error
Last modified: 08 March 2021