Logo
  • DB
  • About
  • Updates
@angular-eslint/eslint-plugin

ESLint plugin for Angular applications, following angular.io/styleguide

❯ npm i --save-dev @angular-eslint/eslint-plugin
📖 README🐛 BugsGitHub LogoGitHubnpm Logonpm@angular/core
🕵️‍♂️ Linter
  • 2 Configs
  • 34 Rules
GitHub LogoGitHub
  • TypeScript
  • 1.5K Stars
  • 30 Watchers
npm Logonpm
  • 832.8K Wkly Downloads
  • +56% WoW
  • 17.1.1 126 kB
🗂️ Keywords
  • typescript
ConfigurationRules
🌐 all34
recommended12 error • 1 warn
RuleDescription🔧💡💭🗂️⚙️🌐
component-class-suffix

Classes decorated with @Component must have suffix "Component" (or custom) in their name. See more at https://angular.io/styleguide#style-02-03

📖⚙️🌐
component-max-inline-declarations

Enforces a maximum number of lines in inline template, styles and animations. See more at https://angular.io/guide/styleguide#style-05-04

📖⚙️🌐
component-selector

Component selectors should follow given naming rules. See more at https://angular.io/guide/styleguide#style-02-07, https://angular.io/guide/styleguide#style-05-02 and https://angular.io/guide/styleguide#style-05-03.

📖⚙️🌐
contextual-decorator

Ensures that classes use contextual decorators in its body

📖🌐
contextual-lifecycle

Ensures that lifecycle methods are used in a correct context

🌐
directive-class-suffix

Classes decorated with @Directive must have suffix "Directive" (or custom) in their name. See more at https://angular.io/styleguide#style-02-03

📖⚙️🌐
directive-selector

Directive selectors should follow given naming rules. See more at https://angular.io/guide/styleguide#style-02-06 and https://angular.io/guide/styleguide#style-02-08.

📖⚙️🌐
no-attribute-decorator

The @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 often the @Attribute decorator is mistakenly used when @Input was what was intended. This rule disallows usage of @Attribute decorator altogether in order to prevent these mistakes.

🌐
no-conflicting-lifecycle

Ensures that directives not implement conflicting lifecycle interfaces.

📖🌐
no-empty-lifecycle-method

Disallows declaring empty lifecycle methods

💡📖🌐
no-forward-ref

Disallows usage of forwardRef references for DI

📖🌐
no-host-metadata-property

Disallows usage of the host metadata property. See more at https://angular.io/styleguide#style-06-03

📖⚙️🌐
no-input-prefix

Ensures that input bindings, including aliases, are not named or prefixed by the configured disallowed prefixes

📖⚙️🌐
no-input-rename

Ensures that input bindings are not aliased

🔧💡📖⚙️🌐
no-inputs-metadata-property

Disallows usage of the inputs metadata property. See more at https://angular.io/styleguide#style-05-12

📖🌐
no-lifecycle-call

Disallows explicit calls to lifecycle methods

📖🌐
no-output-native

Ensures that output bindings, including aliases, are not named as standard DOM events

📖🌐
no-output-on-prefix

Ensures that output bindings, including aliases, are not named "on", nor prefixed with it. See more at https://angular.io/guide/styleguide#style-05-16

📖🌐
no-output-rename

Ensures that output bindings are not aliased

🔧💡📖🌐
no-outputs-metadata-property

Disallows usage of the outputs metadata property. See more at https://angular.io/styleguide#style-05-12

📖🌐
no-pipe-impure

Disallows the declaration of impure pipes

💡📖🌐
no-queries-metadata-property

Disallows usage of the queries metadata property. See more at https://angular.io/styleguide#style-05-12.

📖🌐
pipe-prefix

Enforce consistent prefix for pipes.

📖⚙️🌐
prefer-on-push-component-change-detection

Ensures component's changeDetection is set to ChangeDetectionStrategy.OnPush

💡📖🌐
prefer-output-readonly

Prefer to declare @Output as readonly since they are not supposed to be reassigned

💡📖🌐
prefer-standalone-component

Ensures component standalone property is set to true in the component decorator

🔧📖🌐
relative-url-prefix

The ./ and ../ prefix is standard syntax for relative URLs; don't depend on Angular's current ability to do without that prefix. See more at https://angular.io/styleguide#style-05-04

📖🌐
require-localize-metadata

Ensures that $localize tagged messages contain helpful metadata to aid with translations.

📖⚙️🌐
sort-ngmodule-metadata-arrays

Ensures ASC alphabetical order for NgModule metadata arrays for easy visual scanning

🔧📖⚙️🌐
use-component-selector

Component selector must be declared

📖🌐
use-component-view-encapsulation

Disallows using ViewEncapsulation.None

💡📖🌐
use-injectable-provided-in

Using the providedIn property makes Injectables tree-shakable

💡📖⚙️🌐
use-lifecycle-interface

Ensures that classes implement lifecycle interfaces corresponding to the declared lifecycle methods. See more at https://angular.io/styleguide#style-09-01

📖🌐⚠️
use-pipe-transform-interface

Ensures that Pipes implement PipeTransform interface

🔧📖🌐
© 2024 Lintbase