AngularCan I Use

Explore Angular features, ng update migrations, MCP server features and ESLint rules — all in one place.

Rule NameDescriptionTypeVersionDocumentation
computed-must-returnEnsures that computed() returns a value. Omitting the value is likely a mistake.TypeScript 21.3.0 Documentation
no-non-null-assertionDisallows the non-null assertion operator (!) in templatesHTML 21.3.0 Documentation
no-implicit-takeuntil-destroyedEnsures that takeUntilDestroyed() is called with an explicit DestroyRef when used outside of an injection contextTypeScript 21.2.0 Documentation
prefer-class-bindingSuggests using [class] bindings over ngClass where applicableHTML 21.2.0 Documentation
prefer-signal-modelUse model instead of input and output for two-way bindingsTypeScript 21.1.0 Documentation
prefer-host-metadata-propertyUse `host` metadata property instead of `@HostBinding` and `HostListener`.TypeScript 20.5.0 Documentation
prefer-built-in-pipesEncourages the use of Angular built-in pipes (e.g. lowercase, uppercase, titlecase) instead of certain JavaScript methods in Angular templates.HTML 20.5.0 Documentation
prefer-at-elsePrefer using @else instead of a second @if with the opposite condition to reduce code and make it easier to read.HTML 20.4.0 Documentation
no-empty-control-flowEnsures that control flow blocks are not empty. Empty control flow blocks usually occur due to refactoring that wasn't completed. They can cause confusion when reading code.HTML 20.2.0 Documentation
no-developer-previewDisallow using code which is marked as developer previewTypeScript 20.1.0 Documentation
no-experimentalDisallow using code which is marked as experimentalTypeScript 20.1.0 Documentation
no-uncalled-signalsWarns user about unintentionally doing logic on the signal, rather than the signal's value.TypeScript 19.7.0 Documentation
prefer-injectPrefer using the `inject()` function over constructor parameter injection.TypeScript 19.6.0 Documentation
sort-keys-in-type-decoratorEnsures that keys in type decorators (Component, Directive, NgModule, Pipe) are sorted in a consistent orderTypeScript 19.5.0 Documentation
no-nested-tagsDenies nesting of and tags.HTML 19.5.0 Documentation
prefer-at-emptyPrefer using @empty with @for loops instead of a separate @if or @else block to reduce code and make it easier to read.HTML 19.5.0 Documentation
prefer-output-emitter-refUse `OutputEmitterRef` instead of `@Output()`.TypeScript 19.4.0 Documentation
prefer-template-literalEnsure that template literals are used instead of concatenating strings or expressions.HTML 19.4.0 Documentation
prefer-contextual-for-variablesEnsures that contextual variables are used in @for blocks where possible instead of aliasing them.HTML 19.3.0 Documentation
require-lifecycle-on-prototypeEnsures that lifecycle methods are defined on the object's prototype instead of on an instance.TypeScript 19.2.0 Documentation
prefer-static-string-propertiesEnsures that static string values use property assignment instead of property binding.HTML 19.1.0 Documentation
prefer-signalsUse `readonly` signals instead of `@Input()`, `@ViewChild()` and other legacy decorators.TypeScript 19.0.0 Documentation
runtime-localizeEnsures that $localize tagged messages can use runtime-loaded translations.TypeScript 18.3.0 Documentation
no-duplicates-in-metadata-arraysEnsures that metadata arrays do not contain duplicate entries.TypeScript 17.4.0 Documentation
consistent-component-stylesEnsures consistent usage of `styles` / `styleUrls` / `styleUrl` within Component metadataTypeScript 17.3.0 Documentation
prefer-standaloneEnsures Components, Directives and Pipes do not opt out of standalone.TypeScript 17.3.0 Documentation
no-async-lifecycle-methodAngular Lifecycle methods should not be async. Angular does not wait for async lifecycle but the code incorrectly suggests it does.TypeScript 17.2.0 Documentation
prefer-control-flowEnsures that the built-in control flow is used.HTML 17.1.0 Documentation
sort-lifecycle-methodsEnsures that lifecycle methods are declared in order of executionTypeScript 16.2.0 Documentation
prefer-ngsrcEnsures ngSrc is used instead of src for img elementsHTML 16.2.0 Documentation
prefer-self-closing-tagsEnsures that self-closing tags are used for elements with a closing tag but no content.HTML 16.1.0 Documentation
no-interpolation-in-attributesEnsures that property-binding is used instead of interpolation in attributes.HTML 15.2.0 Documentation
no-inline-stylesDisallows the use of inline styles in HTML templatesHTML 14.3.0 Documentation
no-duplicate-attributesEnsures that there are no duplicate input properties or output event listenersHTML 14.2.0 Documentation
interactive-supports-focus[Accessibility] Ensures that elements with interactive handlers like (click) are focusable.HTML 14.2.0 Documentation
role-has-required-aria[Accessibility] Ensures elements with ARIA roles have all required properties for that role.HTML 14.2.0 Documentation
attributes-orderEnsures that HTML attributes and Angular bindings are sorted based on an expected orderHTML 14.2.0 Documentation
button-has-typeEnsures that a button has a valid type specifiedHTML 13.5.0 Documentation
eqeqeqRequires === and !== in place of == and !=HTML 12.0.0 Documentation
label-has-associated-control[Accessibility] Ensures that a label element/component is associated with a form elementHTML 4.3.0 Documentation
contextual-lifecycleEnsures that lifecycle methods are used in a correct contextTypeScript 1.0.0 Documentation
no-attribute-decoratorThe @Attribute decorator is used to obtain a single value for an attribute. This is a much less common use case than getting a stream of values (using @Input), so the @Attribute decorator is often mistakenly used when @Input is intended. This rule disallows the usage of @Attribute decorator entirely to prevent these mistakes.TypeScript 1.0.0 Documentation
component-class-suffixClasses decorated with @Component must have suffix "Component" (or custom) in their name. Note: As of v20, this is no longer recommended by the Angular Team.TypeScript 1.0.0 Documentation
component-max-inline-declarationsEnforces a maximum number of lines in inline template, styles and animations.TypeScript 1.0.0 Documentation
component-selectorComponent selectors should follow given naming rules. See more at https://angular.dev/style-guide#choosing-component-selectors.TypeScript 1.0.0 Documentation
contextual-decoratorEnsures that classes use contextual decorators in their bodyTypeScript 1.0.0 Documentation
directive-class-suffixClasses decorated with @Directive must have suffix "Directive" (or custom) in their name. Note: As of v20, this is no longer recommended by the Angular Team.TypeScript 1.0.0 Documentation
directive-selectorDirective selectors should follow given naming rules. See more at https://angular.dev/style-guide#choosing-directive-selectors.TypeScript 1.0.0 Documentation
no-conflicting-lifecycleEnsures that directives do not implement conflicting lifecycle interfaces.TypeScript 1.0.0 Documentation
no-empty-lifecycle-methodDisallows declaring empty lifecycle methodsTypeScript 1.0.0 Documentation
no-forward-refDisallows usage of `forwardRef` references for DITypeScript 1.0.0 Documentation
no-input-prefixEnsures that input bindings, including aliases, are not named or prefixed by the configured disallowed prefixesTypeScript 1.0.0 Documentation
no-input-renameEnsures that input bindings are not aliasedTypeScript 1.0.0 Documentation
no-inputs-metadata-propertyDisallows usage of the `inputs` metadata property.TypeScript 1.0.0 Documentation
no-lifecycle-callDisallows explicit calls to lifecycle methods.TypeScript 1.0.0 Documentation
no-output-nativeEnsures that output bindings, including aliases, are not named as standard DOM events.TypeScript 1.0.0 Documentation
no-output-on-prefixEnsures that output bindings, including aliases, are not named "on", nor prefixed with it. See more at https://angular.dev/guide/components/outputs#choosing-event-names.TypeScript 1.0.0 Documentation
no-output-renameEnsures that output bindings are not aliasedTypeScript 1.0.0 Documentation
no-outputs-metadata-propertyDisallows usage of the `outputs` metadata property.TypeScript 1.0.0 Documentation
no-pipe-impureDisallows the declaration of impure pipes.TypeScript 1.0.0 Documentation
no-queries-metadata-propertyDisallows usage of the `queries` metadata property.TypeScript 1.0.0 Documentation
pipe-prefixEnforce consistent prefix for pipes.TypeScript 1.0.0 Documentation
prefer-on-push-component-change-detectionEnsures component's `changeDetection` is set to `ChangeDetectionStrategy.OnPush`.TypeScript 1.0.0 Documentation
prefer-output-readonlyPrefer to declare `@Output`, `OutputEmitterRef` and `OutputRef` as `readonly` since they are not supposed to be reassigned.TypeScript 1.0.0 Documentation
relative-url-prefixThe ./ and ../ prefix is standard syntax for relative URLs; don't depend on Angular's current ability to do without that prefix.TypeScript 1.0.0 Documentation
require-localize-metadataEnsures that $localize tagged messages contain helpful metadata to aid with translations.TypeScript 1.0.0 Documentation
use-component-selectorComponent selector must be declaredTypeScript 1.0.0 Documentation
use-component-view-encapsulationDisallows using ViewEncapsulation.NoneTypeScript 1.0.0 Documentation
use-injectable-provided-inUsing the providedIn property makes Injectables tree-shakableTypeScript 1.0.0 Documentation
use-lifecycle-interfaceEnsures that classes implement lifecycle interfaces corresponding to the declared lifecycle methods. See more at https://angular.dev/style-guide#use-lifecycle-hook-interfacesTypeScript 1.0.0 Documentation
use-pipe-transform-interfaceEnsures that Pipes implement PipeTransform interfaceTypeScript 1.0.0 Documentation
alt-text[Accessibility] Enforces alternate text for elements which require the alt, aria-label, aria-labelledby attributes.HTML 1.0.0 Documentation
banana-in-boxEnsures that the two-way data binding syntax is correctHTML 1.0.0 Documentation
click-events-have-key-events[Accessibility] Ensures that the click event is accompanied with at least one key event keyup, keydown or keypress.HTML 1.0.0 Documentation
conditional-complexityThe conditional complexity should not exceed a rational limitHTML 1.0.0 Documentation
cyclomatic-complexityChecks cyclomatic complexity against a specified limit. It is a quantitative measure of the number of linearly independent paths through a program's source codeHTML 1.0.0 Documentation
elements-content[Accessibility] Ensures that the heading, anchor and button elements have content in themHTML 1.0.0 Documentation
i18nEnsures following best practices for i18n. Checks for missing i18n attributes on elements and attributes containing texts. Can also check for texts without i18n attribute, elements that do not use custom ID (@@) feature and duplicate custom IDsHTML 1.0.0 Documentation
mouse-events-have-key-events[Accessibility] Ensures that the mouse events mouseout and mouseover are accompanied by focus and blur events respectively. Coding for the keyboard is important for users with physical disabilities who cannot use a mouse, AT compatibility, and screenreader users. See more at https://www.w3.org/WAI/WCAG21/Understanding/keyboardHTML 1.0.0 Documentation
no-anyThe use of "$any" nullifies the compile-time benefits of Angular's type systemHTML 1.0.0 Documentation
no-autofocus[Accessibility] Ensures that the autofocus attribute is not usedHTML 1.0.0 Documentation
no-call-expressionDisallows calling expressions in templates, except for output handlersHTML 1.0.0 Documentation
no-distracting-elements[Accessibility] Enforces that no distracting elements are usedHTML 1.0.0 Documentation
no-negated-asyncEnsures that async pipe results, as well as values used with the async pipe, are not negatedHTML 1.0.0 Documentation
no-positive-tabindexEnsures that the tabindex attribute is not positiveHTML 1.0.0 Documentation
table-scope[Accessibility] Ensures that the scope attribute is only used on the <th> elementHTML 1.0.0 Documentation
use-track-by-functionEnsures trackBy function is usedHTML 1.0.0 Documentation
valid-aria[Accessibility] Ensures that correct ARIA attributes and respective values are usedHTML 1.0.0 Documentation