diff --git a/docs/angular.md b/docs/angular.md index eb4f5d9..1594298 100644 --- a/docs/angular.md +++ b/docs/angular.md @@ -58,67 +58,63 @@ Config for **Angular** projects. > ๐Ÿ”ง Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).
๐Ÿ’ก Manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).
๐Ÿงช๐Ÿšซ Disabled for [test files](../README.md#๐Ÿงช-test-overrides).
๐Ÿงชโš ๏ธ Severity lessened to warning for [test files](../README.md#๐Ÿงช-test-overrides). -### ๐Ÿšจ Errors (48) +### ๐Ÿšจ Errors (34) -| Plugin | Rule | Options | Autofix | Overrides | -| :----------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------- | :-----: | :-------: | -| [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [component-class-suffix](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/component-class-suffix.md)
Classes decorated with @Component must have suffix "Component" (or custom) in their name. See more at https://angular.dev/style-guide#style-02-03 | | | | -| [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [contextual-decorator](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/contextual-decorator.md)
Ensures that classes use contextual decorators in its body | | | | -| [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [contextual-lifecycle](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/contextual-lifecycle.md)
Ensures that lifecycle methods are used in a correct context | | | | -| [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [directive-class-suffix](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/directive-class-suffix.md)
Classes decorated with @Directive must have suffix "Directive" (or custom) in their name. See more at https://angular.dev/style-guide#style-02-03 | | | | -| [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [no-conflicting-lifecycle](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-conflicting-lifecycle.md)
Ensures that directives not implement conflicting lifecycle interfaces. | | | | -| [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [no-empty-lifecycle-method](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-empty-lifecycle-method.md)
Disallows declaring empty lifecycle methods | | ๐Ÿ’ก | | -| [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [no-input-rename](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-input-rename.md)
Ensures that input bindings are not aliased | | ๐Ÿ”ง, ๐Ÿ’ก | | -| [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [no-inputs-metadata-property](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-inputs-metadata-property.md)
Disallows usage of the `inputs` metadata property. See more at https://angular.dev/style-guide#style-05-12 | | | | -| [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [no-lifecycle-call](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-lifecycle-call.md)
Disallows explicit calls to lifecycle methods | | | ๐Ÿงชโš ๏ธ | -| [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [no-output-native](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-output-native.md)
Ensures that output bindings, including aliases, are not named as standard DOM events | | | | -| [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [no-output-on-prefix](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-output-on-prefix.md)
Ensures that output bindings, including aliases, are not named "on", nor prefixed with it. See more at https://angular.dev/style-guide#style-05-16 | | | | -| [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [no-output-rename](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-output-rename.md)
Ensures that output bindings are not aliased | | ๐Ÿ”ง, ๐Ÿ’ก | | -| [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [no-outputs-metadata-property](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-outputs-metadata-property.md)
Disallows usage of the `outputs` metadata property. See more at https://angular.dev/style-guide#style-05-12 | | | | -| [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [use-component-view-encapsulation](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-component-view-encapsulation.md)
Disallows using `ViewEncapsulation.None` | | ๐Ÿ’ก | | -| [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [use-pipe-transform-interface](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-pipe-transform-interface.md)
Ensures that `Pipes` implement `PipeTransform` interface | | ๐Ÿ”ง | | -| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [alt-text](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/alt-text.md)
[Accessibility] Enforces alternate text for elements which require the alt, aria-label, aria-labelledby attributes. | | | | -| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [banana-in-box](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/banana-in-box.md)
Ensures that the two-way data binding syntax is correct | | ๐Ÿ”ง | | -| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [click-events-have-key-events](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/click-events-have-key-events.md)
[Accessibility] Ensures that the click event is accompanied with at least one key event keyup, keydown or keypress. | | | | -| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [elements-content](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/elements-content.md)
[Accessibility] Ensures that the heading, anchor and button elements have content in it | | | | -| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [eqeqeq](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/eqeqeq.md)
Requires `===` and `!==` in place of `==` and `!=` | | ๐Ÿ”ง, ๐Ÿ’ก | | -| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [interactive-supports-focus](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/interactive-supports-focus.md)
[Accessibility] Ensures that elements with interactive handlers like `(click)` are focusable. | | | | -| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [label-has-associated-control](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/label-has-associated-control.md)
[Accessibility] Ensures that a label element/component is associated with a form element | | | | -| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [mouse-events-have-key-events](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/mouse-events-have-key-events.md)
[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/keyboard | | | | -| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [no-any](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-any.md)
The use of "$any" nullifies the compile-time benefits of Angular's type system | | ๐Ÿ’ก | | -| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [no-autofocus](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-autofocus.md)
[Accessibility] Ensures that the `autofocus` attribute is not used | | ๐Ÿ”ง | | -| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [no-distracting-elements](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-distracting-elements.md)
[Accessibility] Enforces that no distracting elements are used | | ๐Ÿ”ง | | -| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [no-duplicate-attributes](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-duplicate-attributes.md)
Ensures that there are no duplicate input properties or output event listeners | | ๐Ÿ’ก | | -| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [no-negated-async](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-negated-async.md)
Ensures that async pipe results, as well as values used with the async pipe, are not negated | | ๐Ÿ’ก | | -| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [role-has-required-aria](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/role-has-required-aria.md)
[Accessibility] Ensures elements with ARIA roles have all required properties for that role. | | ๐Ÿ’ก | | -| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [table-scope](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/table-scope.md)
[Accessibility] Ensures that the `scope` attribute is only used on the `` element | | ๐Ÿ”ง | | -| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [valid-aria](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/valid-aria.md)
[Accessibility] Ensures that correct ARIA attributes and respective values are used | | ๐Ÿ’ก | | -| [![import](./icons/icons8/import.png)](https://github.com/import-js/eslint-plugin-import#readme) | [no-namespace](https://github.com/import-js/eslint-plugin-import/blob/v2.31.0/docs/rules/no-namespace.md)
Forbid namespace (a.k.a. "wildcard" `*`) imports. | | ๐Ÿ”ง | | -| [![import](./icons/icons8/import.png)](https://github.com/import-js/eslint-plugin-import#readme) | [no-nodejs-modules](https://github.com/import-js/eslint-plugin-import/blob/v2.31.0/docs/rules/no-nodejs-modules.md)
Forbid Node.js builtin modules. | | | | -| [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-async-subscribe](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-async-subscribe.md)
Disallow passing `async` functions to `subscribe`. | | | | -| [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-create](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-create.md)
Disallow the static `Observable.create` function. | | | | -| [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-ignored-notifier](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-ignored-notifier.md)
Disallow observables not composed from the `repeatWhen` or `retryWhen` notifier. | | | | -| [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-ignored-replay-buffer](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-ignored-replay-buffer.md)
Disallow using `ReplaySubject`, `publishReplay` or `shareReplay` without specifying the buffer size. | | | | -| [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-ignored-takewhile-value](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-ignored-takewhile-value.md)
Disallow ignoring the value within `takeWhile`. | | | | -| [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-implicit-any-catch](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-implicit-any-catch.md)
Disallow implicit `any` error parameters in `catchError` operators. | | ๐Ÿ”ง, ๐Ÿ’ก | | -| [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-index](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-index.md)
Disallow importing index modules. | | | | -| [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-internal](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-internal.md)
Disallow importing internal modules. | | ๐Ÿ”ง, ๐Ÿ’ก | | -| [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-nested-subscribe](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-nested-subscribe.md)
Disallow calling `subscribe` within a `subscribe` callback. | | | | -| [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-redundant-notify](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-redundant-notify.md)
Disallow sending redundant notifications from completed or errored observables. | | | | -| [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-sharereplay](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-sharereplay.md)
Disallow unsafe `shareReplay` usage. |
allowConfig: true
{
  "allowConfig": true
}
| | | -| [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-subject-unsubscribe](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-subject-unsubscribe.md)
Disallow calling the `unsubscribe` method of subjects. | | | | -| [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-unbound-methods](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-unbound-methods.md)
Disallow passing unbound methods. | | | | -| [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-unsafe-subject-next](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-unsafe-subject-next.md)
Disallow unsafe optional `next` calls. | | | | -| [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-unsafe-takeuntil](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-unsafe-takeuntil.md)
Disallow applying operators after `takeUntil`. | | | | +| Plugin | Rule | Options | Autofix | Overrides | +| :----------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------- | :-----: | :-------: | +| [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [contextual-decorator](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/contextual-decorator.md)
Ensures that classes use contextual decorators in its body | | | | +| [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [contextual-lifecycle](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/contextual-lifecycle.md)
Ensures that lifecycle methods are used in a correct context | | | | +| [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [no-conflicting-lifecycle](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-conflicting-lifecycle.md)
Ensures that directives not implement conflicting lifecycle interfaces. | | | | +| [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [use-component-view-encapsulation](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-component-view-encapsulation.md)
Disallows using `ViewEncapsulation.None` | | ๐Ÿ’ก | | +| [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [use-pipe-transform-interface](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-pipe-transform-interface.md)
Ensures that `Pipes` implement `PipeTransform` interface | | ๐Ÿ”ง | | +| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [alt-text](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/alt-text.md)
[Accessibility] Enforces alternate text for elements which require the alt, aria-label, aria-labelledby attributes. | | | | +| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [banana-in-box](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/banana-in-box.md)
Ensures that the two-way data binding syntax is correct | | ๐Ÿ”ง | | +| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [click-events-have-key-events](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/click-events-have-key-events.md)
[Accessibility] Ensures that the click event is accompanied with at least one key event keyup, keydown or keypress. | | | | +| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [elements-content](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/elements-content.md)
[Accessibility] Ensures that the heading, anchor and button elements have content in it | | | | +| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [eqeqeq](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/eqeqeq.md)
Requires `===` and `!==` in place of `==` and `!=` |
allowNullOrUndefined: true
{
  "allowNullOrUndefined": true
}
| ๐Ÿ”ง, ๐Ÿ’ก | | +| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [interactive-supports-focus](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/interactive-supports-focus.md)
[Accessibility] Ensures that elements with interactive handlers like `(click)` are focusable. | | | | +| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [label-has-associated-control](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/label-has-associated-control.md)
[Accessibility] Ensures that a label element/component is associated with a form element | | | | +| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [mouse-events-have-key-events](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/mouse-events-have-key-events.md)
[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/keyboard | | | | +| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [no-any](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-any.md)
The use of "$any" nullifies the compile-time benefits of Angular's type system | | ๐Ÿ’ก | | +| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [no-distracting-elements](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-distracting-elements.md)
[Accessibility] Enforces that no distracting elements are used | | ๐Ÿ”ง | | +| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [no-duplicate-attributes](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-duplicate-attributes.md)
Ensures that there are no duplicate input properties or output event listeners | | ๐Ÿ’ก | | +| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [no-negated-async](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-negated-async.md)
Ensures that async pipe results, as well as values used with the async pipe, are not negated | | ๐Ÿ’ก | | +| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [role-has-required-aria](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/role-has-required-aria.md)
[Accessibility] Ensures elements with ARIA roles have all required properties for that role. | | ๐Ÿ’ก | | +| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [table-scope](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/table-scope.md)
[Accessibility] Ensures that the `scope` attribute is only used on the `` element | | ๐Ÿ”ง | | +| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [valid-aria](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/valid-aria.md)
[Accessibility] Ensures that correct ARIA attributes and respective values are used | | ๐Ÿ’ก | | +| [![import](./icons/icons8/import.png)](https://github.com/import-js/eslint-plugin-import#readme) | [no-namespace](https://github.com/import-js/eslint-plugin-import/blob/v2.31.0/docs/rules/no-namespace.md)
Forbid namespace (a.k.a. "wildcard" `*`) imports. | | ๐Ÿ”ง | | +| [![import](./icons/icons8/import.png)](https://github.com/import-js/eslint-plugin-import#readme) | [no-nodejs-modules](https://github.com/import-js/eslint-plugin-import/blob/v2.31.0/docs/rules/no-nodejs-modules.md)
Forbid Node.js builtin modules. | | | | +| [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-ignored-notifier](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-ignored-notifier.md)
Disallow observables not composed from the `repeatWhen` or `retryWhen` notifier. | | | | +| [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-ignored-replay-buffer](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-ignored-replay-buffer.md)
Disallow using `ReplaySubject`, `publishReplay` or `shareReplay` without specifying the buffer size. | | | | +| [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-ignored-takewhile-value](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-ignored-takewhile-value.md)
Disallow ignoring the value within `takeWhile`. | | | | +| [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-implicit-any-catch](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-implicit-any-catch.md)
Disallow implicit `any` error parameters in `catchError` operators. | | ๐Ÿ”ง, ๐Ÿ’ก | | +| [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-index](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-index.md)
Disallow importing index modules. | | | | +| [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-internal](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-internal.md)
Disallow importing internal modules. | | ๐Ÿ”ง, ๐Ÿ’ก | | +| [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-redundant-notify](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-redundant-notify.md)
Disallow sending redundant notifications from completed or errored observables. | | | | +| [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-sharereplay](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-sharereplay.md)
Disallow unsafe `shareReplay` usage. |
allowConfig: true
{
  "allowConfig": true
}
| | | +| [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-subject-unsubscribe](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-subject-unsubscribe.md)
Disallow calling the `unsubscribe` method of subjects. | | | | +| [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-unbound-methods](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-unbound-methods.md)
Disallow passing unbound methods. | | | | +| [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-unsafe-subject-next](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-unsafe-subject-next.md)
Disallow unsafe optional `next` calls. | | | | +| [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-unsafe-takeuntil](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-unsafe-takeuntil.md)
Disallow applying operators after `takeUntil`. | | | | -### โš ๏ธ Warnings (28) +### โš ๏ธ Warnings (42) | Plugin | Rule | Options | Autofix | Overrides | | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-----: | :-------: | +| [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [component-class-suffix](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/component-class-suffix.md)
Classes decorated with @Component must have suffix "Component" (or custom) in their name. See more at https://angular.dev/style-guide#style-02-03 | | | | | [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [component-max-inline-declarations](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/component-max-inline-declarations.md)
Enforces a maximum number of lines in inline template, styles and animations. See more at https://angular.dev/style-guide#style-05-04 | | | ๐Ÿงช๐Ÿšซ | | [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [component-selector](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/component-selector.md)
Component selectors should follow given naming rules. See more at https://angular.dev/style-guide#style-02-07, https://angular.dev/style-guide#style-05-02
and https://angular.dev/style-guide#style-05-03. |
type: element, style: kebab...
{
  "type": "element",
  "style": "kebab-case"
}
| | | +| [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [directive-class-suffix](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/directive-class-suffix.md)
Classes decorated with @Directive must have suffix "Directive" (or custom) in their name. See more at https://angular.dev/style-guide#style-02-03 | | | | | [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [directive-selector](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/directive-selector.md)
Directive selectors should follow given naming rules. See more at https://angular.dev/style-guide#style-02-06 and https://angular.dev/style-guide#style-02-08. |
type: attribute, style: cam...
{
  "type": "attribute",
  "style": "camelCase"
}
| | | | [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [no-attribute-decorator](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-attribute-decorator.md)
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. | | | | +| [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [no-empty-lifecycle-method](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-empty-lifecycle-method.md)
Disallows declaring empty lifecycle methods | | ๐Ÿ’ก | | +| [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [no-input-rename](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-input-rename.md)
Ensures that input bindings are not aliased | | ๐Ÿ”ง, ๐Ÿ’ก | | +| [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [no-inputs-metadata-property](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-inputs-metadata-property.md)
Disallows usage of the `inputs` metadata property. See more at https://angular.dev/style-guide#style-05-12 | | | | +| [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [no-lifecycle-call](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-lifecycle-call.md)
Disallows explicit calls to lifecycle methods | | | | +| [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [no-output-native](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-output-native.md)
Ensures that output bindings, including aliases, are not named as standard DOM events | | | | +| [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [no-output-on-prefix](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-output-on-prefix.md)
Ensures that output bindings, including aliases, are not named "on", nor prefixed with it. See more at https://angular.dev/style-guide#style-05-16 | | | | +| [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [no-output-rename](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-output-rename.md)
Ensures that output bindings are not aliased | | ๐Ÿ”ง, ๐Ÿ’ก | | +| [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [no-outputs-metadata-property](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-outputs-metadata-property.md)
Disallows usage of the `outputs` metadata property. See more at https://angular.dev/style-guide#style-05-12 | | | | | [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [no-pipe-impure](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-pipe-impure.md)
Disallows the declaration of impure pipes | | ๐Ÿ’ก | | | [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [no-queries-metadata-property](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-queries-metadata-property.md)
Disallows usage of the `queries` metadata property. See more at https://angular.dev/style-guide#style-05-12. | | | | | [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [prefer-on-push-component-change-detection](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-on-push-component-change-detection.md)
Ensures component's `changeDetection` is set to `ChangeDetectionStrategy.OnPush` | | ๐Ÿ’ก | ๐Ÿงช๐Ÿšซ | @@ -131,6 +127,7 @@ Config for **Angular** projects. | [![@angular-eslint](./icons/material/angular.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin#readme) | [use-lifecycle-interface](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-lifecycle-interface.md)
Ensures that classes implement lifecycle interfaces corresponding to the declared lifecycle methods. See more at https://angular.dev/style-guide#style-09-01 | | ๐Ÿ”ง | | | [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [conditional-complexity](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/conditional-complexity.md)
The conditional complexity should not exceed a rational limit | | | | | [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [cyclomatic-complexity](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/cyclomatic-complexity.md)
Checks cyclomatic complexity against a specified limit. It is a quantitative measure of the number of linearly independent paths through a program's source code |
maxComplexity: 20
{
  "maxComplexity": 20
}
| | | +| [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [no-autofocus](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-autofocus.md)
[Accessibility] Ensures that the `autofocus` attribute is not used | | ๐Ÿ”ง | | | [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [no-inline-styles](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-inline-styles.md)
Disallows the use of inline styles in HTML templates |
allowNgStyle: true, allowBi...
{
  "allowNgStyle": true,
  "allowBindToStyle": true
}
| | | | [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [no-interpolation-in-attributes](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-interpolation-in-attributes.md)
Ensures that property-binding is used instead of interpolation in attributes. | | | | | [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [no-positive-tabindex](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-positive-tabindex.md)
Ensures that the `tabindex` attribute is not positive | | ๐Ÿ’ก | | @@ -138,8 +135,11 @@ Config for **Angular** projects. | [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [prefer-self-closing-tags](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/prefer-self-closing-tags.md)
Ensures that self-closing tags are used for elements with a closing tag but no content. | | ๐Ÿ”ง | | | [![@angular-eslint/template](./icons/material/angular_component.png)](https://github.com/angular-eslint/angular-eslint/tree/main/packages/eslint-plugin-template#readme) | [use-track-by-function](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/use-track-by-function.md)
Ensures trackBy function is used | | | | | [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [finnish](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/finnish.md)
Enforce Finnish notation. | | | ๐Ÿงช๐Ÿšซ | +| [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-async-subscribe](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-async-subscribe.md)
Disallow passing `async` functions to `subscribe`. | | | | | [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-compat](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-compat.md)
Disallow the `rxjs-compat` package. | | | | +| [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-create](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-create.md)
Disallow the static `Observable.create` function. | | | | | [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-exposed-subjects](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-exposed-subjects.md)
Disallow public and protected subjects. | | | | | [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-ignored-observable](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-ignored-observable.md)
Disallow ignoring observables returned by functions. | | | | +| [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [no-nested-subscribe](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/no-nested-subscribe.md)
Disallow calling `subscribe` within a `subscribe` callback. | | | | | [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [prefer-observer](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/prefer-observer.md)
Disallow passing separate handlers to `subscribe` and `tap`. | | ๐Ÿ”ง, ๐Ÿ’ก | | | [![rxjs-x](./icons/other/rxjs.png)](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x#readme) | [throw-error](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x/blob/main/docs/rules/throw-error.md)
Enforce passing only `Error` values to error notifications. | | | | diff --git a/docs/graphql.md b/docs/graphql.md index e538c6a..72f172a 100644 --- a/docs/graphql.md +++ b/docs/graphql.md @@ -45,24 +45,22 @@ Config for **GraphQL servers** implemented in Node.js. > ๐Ÿ”ง Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).
๐Ÿ’ก Manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).
๐Ÿงช๐Ÿšซ Disabled for [test files](../README.md#๐Ÿงช-test-overrides).
๐Ÿงชโš ๏ธ Severity lessened to warning for [test files](../README.md#๐Ÿงช-test-overrides). -### ๐Ÿšจ Errors (23) +### ๐Ÿšจ Errors (21) | Plugin | Rule | Options | Autofix | Overrides | | :-------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-----: | :-------: | -| [![@graphql-eslint](./icons/material/graphql.png)](https://the-guild.dev/graphql/eslint/docs) | [description-style](https://the-guild.dev/graphql/eslint/rules/description-style)
Require all comments to follow the same style (either block or inline). | | ๐Ÿ’ก | | | [![@graphql-eslint](./icons/material/graphql.png)](https://the-guild.dev/graphql/eslint/docs) | [known-argument-names](https://the-guild.dev/graphql/eslint/rules/known-argument-names)
A GraphQL field is only valid if all supplied arguments are defined by that field.
> This rule is a wrapper around a `graphql-js` validation function. | | ๐Ÿ’ก | | | [![@graphql-eslint](./icons/material/graphql.png)](https://the-guild.dev/graphql/eslint/docs) | [known-directives](https://the-guild.dev/graphql/eslint/rules/known-directives)
A GraphQL document is only valid if all `@directive`s are known by the schema and legally positioned.
> This rule is a wrapper around a `graphql-js` validation function. | | | | | [![@graphql-eslint](./icons/material/graphql.png)](https://the-guild.dev/graphql/eslint/docs) | [known-type-names](https://the-guild.dev/graphql/eslint/rules/known-type-names)
A GraphQL document is only valid if referenced types (specifically variable definitions and fragment conditions) are defined by the type schema.
> This rule is a wrapper around a `graphql-js` validation function. | | ๐Ÿ’ก | | | [![@graphql-eslint](./icons/material/graphql.png)](https://the-guild.dev/graphql/eslint/docs) | [lone-schema-definition](https://the-guild.dev/graphql/eslint/rules/lone-schema-definition)
A GraphQL document is only valid if it contains only one schema definition.
> This rule is a wrapper around a `graphql-js` validation function. | | | | | [![@graphql-eslint](./icons/material/graphql.png)](https://the-guild.dev/graphql/eslint/docs) | [naming-convention](https://the-guild.dev/graphql/eslint/rules/naming-convention)
Require names to follow specified conventions. |
types: PascalCase, FieldDef...
{
  "types": "PascalCase",
  "FieldDefinition": "camelCase",
  "InputValueDefinition": "camelCase",
  "Argument": "camelCase",
  "DirectiveDefinition": "camelCase",
  "EnumValueDefinition": "UPPER_CASE",
  "FieldDefinition[parent.name.value=Query]": {
    "forbiddenPrefixes": [
      "query",
      "get"
    ],
    "forbiddenSuffixes": [
      "Query"
    ]
  },
  "FieldDefinition[parent.name.value=Mutation]": {
    "forbiddenPrefixes": [
      "mutation"
    ],
    "forbiddenSuffixes": [
      "Mutation"
    ]
  },
  "FieldDefinition[parent.name.value=Subscription]": {
    "forbiddenPrefixes": [
      "subscription"
    ],
    "forbiddenSuffixes": [
      "Subscription"
    ]
  }
}
| ๐Ÿ’ก | | | [![@graphql-eslint](./icons/material/graphql.png)](https://the-guild.dev/graphql/eslint/docs) | [no-case-insensitive-enum-values-duplicates](https://the-guild.dev/graphql/eslint/rules/no-case-insensitive-enum-values-duplicates)
Disallow case-insensitive enum values duplicates. | | ๐Ÿ’ก | | -| [![@graphql-eslint](./icons/material/graphql.png)](https://the-guild.dev/graphql/eslint/docs) | [no-hashtag-description](https://the-guild.dev/graphql/eslint/rules/no-hashtag-description)
Requires to use `"""` or `"` for adding a GraphQL description instead of `#`.
Allows to use hashtag for comments, as long as it's not attached to an AST definition. | | ๐Ÿ’ก | | | [![@graphql-eslint](./icons/material/graphql.png)](https://the-guild.dev/graphql/eslint/docs) | [no-typename-prefix](https://the-guild.dev/graphql/eslint/rules/no-typename-prefix)
Enforces users to avoid using the type name in a field name while defining your schema. | | ๐Ÿ’ก | | | [![@graphql-eslint](./icons/material/graphql.png)](https://the-guild.dev/graphql/eslint/docs) | [no-unreachable-types](https://the-guild.dev/graphql/eslint/rules/no-unreachable-types)
Requires all types to be reachable at some level by root level fields. | | ๐Ÿ’ก | | | [![@graphql-eslint](./icons/material/graphql.png)](https://the-guild.dev/graphql/eslint/docs) | [provided-required-arguments](https://the-guild.dev/graphql/eslint/rules/provided-required-arguments)
A field or directive is only valid if all required (non-null without a default value) field arguments have been provided.
> This rule is a wrapper around a `graphql-js` validation function. | | | | | [![@graphql-eslint](./icons/material/graphql.png)](https://the-guild.dev/graphql/eslint/docs) | [relay-arguments](https://the-guild.dev/graphql/eslint/rules/relay-arguments)
Set of rules to follow Relay specification for Arguments.

- A field that returns a Connection type must include forward pagination arguments (`first` and `after`), backward pagination arguments (`last` and `before`), or both

Forward pagination arguments

- `first` takes a non-negative integer
- `after` takes the Cursor type

Backward pagination arguments

- `last` takes a non-negative integer
- `before` takes the Cursor type | | | | | [![@graphql-eslint](./icons/material/graphql.png)](https://the-guild.dev/graphql/eslint/docs) | [relay-connection-types](https://the-guild.dev/graphql/eslint/rules/relay-connection-types)
Set of rules to follow Relay specification for Connection types.

- Any type whose name ends in "Connection" is considered by spec to be a `Connection type`
- Connection type must be an Object type
- Connection type must contain a field `edges` that return a list type that wraps an edge type
- Connection type must contain a field `pageInfo` that return a non-null `PageInfo` Object type | | | | -| [![@graphql-eslint](./icons/material/graphql.png)](https://the-guild.dev/graphql/eslint/docs) | [relay-edge-types](https://the-guild.dev/graphql/eslint/rules/relay-edge-types)
Set of rules to follow Relay specification for Edge types.

- A type that is returned in list form by a connection type's `edges` field is considered by this spec to be an Edge type
- Edge type must be an Object type
- Edge type must contain a field `node` that return either Scalar, Enum, Object, Interface, Union, or a non-null wrapper around one of those types. Notably, this field cannot return a list
- Edge type must contain a field `cursor` that return either String, Scalar, or a non-null wrapper around one of those types
- Edge type name must end in "Edge" _(optional)_
- Edge type's field `node` must implement `Node` interface _(optional)_
- A list type should only wrap an edge type _(optional)_ | | | | +| [![@graphql-eslint](./icons/material/graphql.png)](https://the-guild.dev/graphql/eslint/docs) | [relay-edge-types](https://the-guild.dev/graphql/eslint/rules/relay-edge-types)
Set of rules to follow Relay specification for Edge types.

- A type that is returned in list form by a connection type's `edges` field is considered by this spec to be an Edge type
- Edge type must be an Object type
- Edge type must contain a field `node` that return either Scalar, Enum, Object, Interface, Union, or a non-null wrapper around one of those types. Notably, this field cannot return a list
- Edge type must contain a field `cursor` that return either String, Scalar, or a non-null wrapper around one of those types
- Edge type name must end in "Edge" _(optional)_
- Edge type's field `node` must implement `Node` interface _(optional)_
- A list type should only wrap an edge type _(optional)_ |
listTypeCanWrapOnlyEdgeType...
{
  "listTypeCanWrapOnlyEdgeType": false
}
| | | | [![@graphql-eslint](./icons/material/graphql.png)](https://the-guild.dev/graphql/eslint/docs) | [relay-page-info](https://the-guild.dev/graphql/eslint/rules/relay-page-info)
Set of rules to follow Relay specification for `PageInfo` object.

- `PageInfo` must be an Object type
- `PageInfo` must contain fields `hasPreviousPage` and `hasNextPage`, that return non-null Boolean
- `PageInfo` must contain fields `startCursor` and `endCursor`, that return either String or Scalar, which can be null if there are no results | | | | | [![@graphql-eslint](./icons/material/graphql.png)](https://the-guild.dev/graphql/eslint/docs) | [require-deprecation-reason](https://the-guild.dev/graphql/eslint/rules/require-deprecation-reason)
Require all deprecation directives to specify a reason. | | | | | [![@graphql-eslint](./icons/material/graphql.png)](https://the-guild.dev/graphql/eslint/docs) | [require-description](https://the-guild.dev/graphql/eslint/rules/require-description)
Enforce descriptions in type definitions and operations. |
types: true, DirectiveDefin...
{
  "types": true,
  "DirectiveDefinition": true
}
| | | @@ -72,3 +70,10 @@ Config for **GraphQL servers** implemented in Node.js. | [![@graphql-eslint](./icons/material/graphql.png)](https://the-guild.dev/graphql/eslint/docs) | [unique-field-definition-names](https://the-guild.dev/graphql/eslint/rules/unique-field-definition-names)
A GraphQL complex type is only valid if all its fields are uniquely named.
> This rule is a wrapper around a `graphql-js` validation function. | | | | | [![@graphql-eslint](./icons/material/graphql.png)](https://the-guild.dev/graphql/eslint/docs) | [unique-operation-types](https://the-guild.dev/graphql/eslint/rules/unique-operation-types)
A GraphQL document is only valid if it has only one type per operation.
> This rule is a wrapper around a `graphql-js` validation function. | | | | | [![@graphql-eslint](./icons/material/graphql.png)](https://the-guild.dev/graphql/eslint/docs) | [unique-type-names](https://the-guild.dev/graphql/eslint/rules/unique-type-names)
A GraphQL document is only valid if all defined types have unique names.
> This rule is a wrapper around a `graphql-js` validation function. | | | | + +### โš ๏ธ Warnings (2) + +| Plugin | Rule | Options | Autofix | Overrides | +| :-------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------- | :-----: | :-------: | +| [![@graphql-eslint](./icons/material/graphql.png)](https://the-guild.dev/graphql/eslint/docs) | [description-style](https://the-guild.dev/graphql/eslint/rules/description-style)
Require all comments to follow the same style (either block or inline). |
style: inline
{
  "style": "inline"
}
| ๐Ÿ’ก | | +| [![@graphql-eslint](./icons/material/graphql.png)](https://the-guild.dev/graphql/eslint/docs) | [no-hashtag-description](https://the-guild.dev/graphql/eslint/rules/no-hashtag-description)
Requires to use `"""` or `"` for adding a GraphQL description instead of `#`.
Allows to use hashtag for comments, as long as it's not attached to an AST definition. | | ๐Ÿ’ก | | diff --git a/docs/javascript.md b/docs/javascript.md index 8382878..c214edf 100644 --- a/docs/javascript.md +++ b/docs/javascript.md @@ -10,151 +10,132 @@ Refer to [setup instructions in README](../README.md#๐Ÿ—๏ธ-setup). > ๐Ÿ”ง Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).
๐Ÿ’ก Manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).
๐Ÿงช๐Ÿšซ Disabled for [test files](../README.md#๐Ÿงช-test-overrides).
๐Ÿงชโš ๏ธ Severity lessened to warning for [test files](../README.md#๐Ÿงช-test-overrides). -### ๐Ÿšจ Errors (139) +### ๐Ÿšจ Errors (120) -| Plugin | Rule | Options | Autofix | Overrides | -| :--------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------- | :-----: | :-------: | -| | [constructor-super](https://eslint.org/docs/latest/rules/constructor-super)
Require `super()` calls in constructors | | | | -| | [eqeqeq](https://eslint.org/docs/latest/rules/eqeqeq)
Require the use of `===` and `!==` |
always, null: never
[
  "always",
  {
    "null": "never"
  }
]
| ๐Ÿ”ง | | -| | [for-direction](https://eslint.org/docs/latest/rules/for-direction)
Enforce "for" loop update clause moving the counter in the right direction | | | | -| | [getter-return](https://eslint.org/docs/latest/rules/getter-return)
Enforce `return` statements in getters | | | | -| | [guard-for-in](https://eslint.org/docs/latest/rules/guard-for-in)
Require `for-in` loops to include an `if` statement | | | | -| | [no-async-promise-executor](https://eslint.org/docs/latest/rules/no-async-promise-executor)
Disallow using an async function as a Promise executor | | | | -| | [no-case-declarations](https://eslint.org/docs/latest/rules/no-case-declarations)
Disallow lexical declarations in case clauses | | ๐Ÿ’ก | | -| | [no-class-assign](https://eslint.org/docs/latest/rules/no-class-assign)
Disallow reassigning class members | | | | -| | [no-compare-neg-zero](https://eslint.org/docs/latest/rules/no-compare-neg-zero)
Disallow comparing against -0 | | | | -| | [no-cond-assign](https://eslint.org/docs/latest/rules/no-cond-assign)
Disallow assignment operators in conditional expressions | | | | -| | [no-const-assign](https://eslint.org/docs/latest/rules/no-const-assign)
Disallow reassigning `const` variables | | | | -| | [no-constant-binary-expression](https://eslint.org/docs/latest/rules/no-constant-binary-expression)
Disallow expressions where the operation doesn't affect the value | | | | -| | [no-constant-condition](https://eslint.org/docs/latest/rules/no-constant-condition)
Disallow constant expressions in conditions | | | | -| | [no-control-regex](https://eslint.org/docs/latest/rules/no-control-regex)
Disallow control characters in regular expressions | | | | -| | [no-debugger](https://eslint.org/docs/latest/rules/no-debugger)
Disallow the use of `debugger` | | | | -| | [no-delete-var](https://eslint.org/docs/latest/rules/no-delete-var)
Disallow deleting variables | | | | -| | [no-dupe-args](https://eslint.org/docs/latest/rules/no-dupe-args)
Disallow duplicate arguments in `function` definitions | | | | -| | [no-dupe-class-members](https://eslint.org/docs/latest/rules/no-dupe-class-members)
Disallow duplicate class members | | | | -| | [no-dupe-else-if](https://eslint.org/docs/latest/rules/no-dupe-else-if)
Disallow duplicate conditions in if-else-if chains | | | | -| | [no-dupe-keys](https://eslint.org/docs/latest/rules/no-dupe-keys)
Disallow duplicate keys in object literals | | | | -| | [no-duplicate-case](https://eslint.org/docs/latest/rules/no-duplicate-case)
Disallow duplicate case labels | | | | -| | [no-empty](https://eslint.org/docs/latest/rules/no-empty)
Disallow empty block statements | | ๐Ÿ’ก | | -| | [no-empty-character-class](https://eslint.org/docs/latest/rules/no-empty-character-class)
Disallow empty character classes in regular expressions | | | | -| | [no-empty-pattern](https://eslint.org/docs/latest/rules/no-empty-pattern)
Disallow empty destructuring patterns | | | | -| | [no-empty-static-block](https://eslint.org/docs/latest/rules/no-empty-static-block)
Disallow empty static blocks | | | | -| | [no-eval](https://eslint.org/docs/latest/rules/no-eval)
Disallow the use of `eval()` | | | | -| | [no-ex-assign](https://eslint.org/docs/latest/rules/no-ex-assign)
Disallow reassigning exceptions in `catch` clauses | | | | -| | [no-extra-boolean-cast](https://eslint.org/docs/latest/rules/no-extra-boolean-cast)
Disallow unnecessary boolean casts | | ๐Ÿ”ง | | -| | [no-fallthrough](https://eslint.org/docs/latest/rules/no-fallthrough)
Disallow fallthrough of `case` statements | | | | -| | [no-func-assign](https://eslint.org/docs/latest/rules/no-func-assign)
Disallow reassigning `function` declarations | | | | -| | [no-global-assign](https://eslint.org/docs/latest/rules/no-global-assign)
Disallow assignments to native objects or read-only global variables | | | | -| | [no-import-assign](https://eslint.org/docs/latest/rules/no-import-assign)
Disallow assigning to imported bindings | | | | -| | [no-inner-declarations](https://eslint.org/docs/latest/rules/no-inner-declarations)
Disallow variable or `function` declarations in nested blocks | | | | -| | [no-invalid-regexp](https://eslint.org/docs/latest/rules/no-invalid-regexp)
Disallow invalid regular expression strings in `RegExp` constructors | | | | -| | [no-irregular-whitespace](https://eslint.org/docs/latest/rules/no-irregular-whitespace)
Disallow irregular whitespace | | | | -| | [no-loss-of-precision](https://eslint.org/docs/latest/rules/no-loss-of-precision)
Disallow literal numbers that lose precision | | | | -| | [no-misleading-character-class](https://eslint.org/docs/latest/rules/no-misleading-character-class)
Disallow characters which are made with multiple code points in character class syntax | | ๐Ÿ’ก | | -| | [no-new-native-nonconstructor](https://eslint.org/docs/latest/rules/no-new-native-nonconstructor)
Disallow `new` operators with global non-constructor functions | | | | -| | [no-nonoctal-decimal-escape](https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape)
Disallow `\8` and `\9` escape sequences in string literals | | ๐Ÿ’ก | | -| | [no-obj-calls](https://eslint.org/docs/latest/rules/no-obj-calls)
Disallow calling global object properties as functions | | | | -| | [no-octal](https://eslint.org/docs/latest/rules/no-octal)
Disallow octal literals | | | | -| | [no-param-reassign](https://eslint.org/docs/latest/rules/no-param-reassign)
Disallow reassigning `function` parameters |
props: true
{
  "props": true
}
| | | -| | [no-prototype-builtins](https://eslint.org/docs/latest/rules/no-prototype-builtins)
Disallow calling some `Object.prototype` methods directly on objects | | ๐Ÿ’ก | | -| | [no-redeclare](https://eslint.org/docs/latest/rules/no-redeclare)
Disallow variable redeclaration | | | | -| | [no-regex-spaces](https://eslint.org/docs/latest/rules/no-regex-spaces)
Disallow multiple spaces in regular expressions | | ๐Ÿ”ง | | -| | [no-self-assign](https://eslint.org/docs/latest/rules/no-self-assign)
Disallow assignments where both sides are exactly the same | | | | -| | [no-sequences](https://eslint.org/docs/latest/rules/no-sequences)
Disallow comma operators | | | | -| | [no-setter-return](https://eslint.org/docs/latest/rules/no-setter-return)
Disallow returning values from setters | | | | -| | [no-shadow-restricted-names](https://eslint.org/docs/latest/rules/no-shadow-restricted-names)
Disallow identifiers from shadowing restricted names | | | | -| | [no-sparse-arrays](https://eslint.org/docs/latest/rules/no-sparse-arrays)
Disallow sparse arrays | | | | -| | [no-template-curly-in-string](https://eslint.org/docs/latest/rules/no-template-curly-in-string)
Disallow template literal placeholder syntax in regular strings | | | | -| | [no-this-before-super](https://eslint.org/docs/latest/rules/no-this-before-super)
Disallow `this`/`super` before calling `super()` in constructors | | | | -| | [no-undef](https://eslint.org/docs/latest/rules/no-undef)
Disallow the use of undeclared variables unless mentioned in `/*global */` comments | | | | -| | [no-unexpected-multiline](https://eslint.org/docs/latest/rules/no-unexpected-multiline)
Disallow confusing multiline expressions | | | | -| | [no-unreachable](https://eslint.org/docs/latest/rules/no-unreachable)
Disallow unreachable code after `return`, `throw`, `continue`, and `break` statements | | | | -| | [no-unreachable-loop](https://eslint.org/docs/latest/rules/no-unreachable-loop)
Disallow loops with a body that allows only one iteration | | | | -| | [no-unsafe-finally](https://eslint.org/docs/latest/rules/no-unsafe-finally)
Disallow control flow statements in `finally` blocks | | | | -| | [no-unsafe-negation](https://eslint.org/docs/latest/rules/no-unsafe-negation)
Disallow negating the left operand of relational operators | | ๐Ÿ’ก | | -| | [no-unsafe-optional-chaining](https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining)
Disallow use of optional chaining in contexts where the `undefined` value is not allowed | | | | -| | [no-unused-labels](https://eslint.org/docs/latest/rules/no-unused-labels)
Disallow unused labels | | ๐Ÿ”ง | | -| | [no-unused-private-class-members](https://eslint.org/docs/latest/rules/no-unused-private-class-members)
Disallow unused private class members | | | | -| | [no-unused-vars](https://eslint.org/docs/latest/rules/no-unused-vars)
Disallow unused variables | | | | -| | [no-useless-backreference](https://eslint.org/docs/latest/rules/no-useless-backreference)
Disallow useless backreferences in regular expressions | | | | -| | [no-useless-catch](https://eslint.org/docs/latest/rules/no-useless-catch)
Disallow unnecessary `catch` clauses | | | | -| | [no-useless-escape](https://eslint.org/docs/latest/rules/no-useless-escape)
Disallow unnecessary escape characters | | ๐Ÿ’ก | | -| | [no-var](https://eslint.org/docs/latest/rules/no-var)
Require `let` or `const` instead of `var` | | ๐Ÿ”ง | | -| | [no-with](https://eslint.org/docs/latest/rules/no-with)
Disallow `with` statements | | | | -| | [prefer-const](https://eslint.org/docs/latest/rules/prefer-const)
Require `const` declarations for variables that are never reassigned after declared | | ๐Ÿ”ง | | -| | [prefer-rest-params](https://eslint.org/docs/latest/rules/prefer-rest-params)
Require rest parameters instead of `arguments` | | | | -| | [prefer-spread](https://eslint.org/docs/latest/rules/prefer-spread)
Require spread operators instead of `.apply()` | | | | -| | [require-yield](https://eslint.org/docs/latest/rules/require-yield)
Require generator functions to contain `yield` | | | | -| | [use-isnan](https://eslint.org/docs/latest/rules/use-isnan)
Require calls to `isNaN()` when checking for `NaN` | | ๐Ÿ’ก | | -| | [valid-typeof](https://eslint.org/docs/latest/rules/valid-typeof)
Enforce comparing `typeof` expressions against valid strings | | ๐Ÿ’ก | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [ban-ts-comment](https://typescript-eslint.io/rules/ban-ts-comment)
Disallow `@ts-` comments or require descriptions after directives | | ๐Ÿ’ก | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-array-constructor](https://typescript-eslint.io/rules/no-array-constructor)
Disallow generic `Array` constructors | | ๐Ÿ”ง | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-duplicate-enum-values](https://typescript-eslint.io/rules/no-duplicate-enum-values)
Disallow duplicate enum member values | | | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-empty-object-type](https://typescript-eslint.io/rules/no-empty-object-type)
Disallow accidentally using the "empty object" type | | ๐Ÿ’ก | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-explicit-any](https://typescript-eslint.io/rules/no-explicit-any)
Disallow the `any` type | | ๐Ÿ”ง, ๐Ÿ’ก | ๐Ÿงช๐Ÿšซ | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-extra-non-null-assertion](https://typescript-eslint.io/rules/no-extra-non-null-assertion)
Disallow extra non-null assertions | | ๐Ÿ”ง | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-misused-new](https://typescript-eslint.io/rules/no-misused-new)
Enforce valid definition of `new` and `constructor` | | | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-namespace](https://typescript-eslint.io/rules/no-namespace)
Disallow TypeScript namespaces | | | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-non-null-asserted-optional-chain](https://typescript-eslint.io/rules/no-non-null-asserted-optional-chain)
Disallow non-null assertions after an optional chain expression | | ๐Ÿ’ก | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-require-imports](https://typescript-eslint.io/rules/no-require-imports)
Disallow invocation of `require()` | | | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-this-alias](https://typescript-eslint.io/rules/no-this-alias)
Disallow aliasing `this` | | | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unnecessary-type-constraint](https://typescript-eslint.io/rules/no-unnecessary-type-constraint)
Disallow unnecessary constraints on generic types | | ๐Ÿ’ก | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unsafe-declaration-merging](https://typescript-eslint.io/rules/no-unsafe-declaration-merging)
Disallow unsafe declaration merging | | | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unsafe-function-type](https://typescript-eslint.io/rules/no-unsafe-function-type)
Disallow using the unsafe built-in Function type | | ๐Ÿ”ง | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unused-expressions](https://typescript-eslint.io/rules/no-unused-expressions)
Disallow unused expressions | | | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unused-vars](https://typescript-eslint.io/rules/no-unused-vars)
Disallow unused variables | | | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-wrapper-object-types](https://typescript-eslint.io/rules/no-wrapper-object-types)
Disallow using confusing built-in primitive class wrappers | | ๐Ÿ”ง | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [prefer-as-const](https://typescript-eslint.io/rules/prefer-as-const)
Enforce the use of `as const` over literal type | | ๐Ÿ”ง, ๐Ÿ’ก | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [prefer-namespace-keyword](https://typescript-eslint.io/rules/prefer-namespace-keyword)
Require using `namespace` keyword over `module` keyword to declare custom TypeScript modules | | ๐Ÿ”ง | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [triple-slash-reference](https://typescript-eslint.io/rules/triple-slash-reference)
Disallow certain triple slash directives in favor of ES6-style import declarations | | | | -| [![import](./icons/icons8/import.png)](https://github.com/import-js/eslint-plugin-import#readme) | [default](https://github.com/import-js/eslint-plugin-import/blob/v2.31.0/docs/rules/default.md)
Ensure a default export is present, given a default import. | | | | -| [![import](./icons/icons8/import.png)](https://github.com/import-js/eslint-plugin-import#readme) | [export](https://github.com/import-js/eslint-plugin-import/blob/v2.31.0/docs/rules/export.md)
Forbid any invalid exports, i.e. re-export of the same name. | | | | -| [![import](./icons/icons8/import.png)](https://github.com/import-js/eslint-plugin-import#readme) | [named](https://github.com/import-js/eslint-plugin-import/blob/v2.31.0/docs/rules/named.md)
Ensure named imports correspond to a named export in the remote file. | | | | -| [![import](./icons/icons8/import.png)](https://github.com/import-js/eslint-plugin-import#readme) | [namespace](https://github.com/import-js/eslint-plugin-import/blob/v2.31.0/docs/rules/namespace.md)
Ensure imported namespaces contain dereferenced properties as they are dereferenced. | | | | -| [![import](./icons/icons8/import.png)](https://github.com/import-js/eslint-plugin-import#readme) | [no-absolute-path](https://github.com/import-js/eslint-plugin-import/blob/v2.31.0/docs/rules/no-absolute-path.md)
Forbid import of modules using absolute paths. | | ๐Ÿ”ง | | -| [![import](./icons/icons8/import.png)](https://github.com/import-js/eslint-plugin-import#readme) | [no-amd](https://github.com/import-js/eslint-plugin-import/blob/v2.31.0/docs/rules/no-amd.md)
Forbid AMD `require` and `define` calls. | | | | -| [![import](./icons/icons8/import.png)](https://github.com/import-js/eslint-plugin-import#readme) | [no-commonjs](https://github.com/import-js/eslint-plugin-import/blob/v2.31.0/docs/rules/no-commonjs.md)
Forbid CommonJS `require` calls and `module.exports` or `exports.*`. | | | | -| [![import](./icons/icons8/import.png)](https://github.com/import-js/eslint-plugin-import#readme) | [no-cycle](https://github.com/import-js/eslint-plugin-import/blob/v2.31.0/docs/rules/no-cycle.md)
Forbid a module from importing a module with a dependency path back to itself. | | | | -| [![import](./icons/icons8/import.png)](https://github.com/import-js/eslint-plugin-import#readme) | [no-mutable-exports](https://github.com/import-js/eslint-plugin-import/blob/v2.31.0/docs/rules/no-mutable-exports.md)
Forbid the use of mutable exports with `var` or `let`. | | | | -| [![import](./icons/icons8/import.png)](https://github.com/import-js/eslint-plugin-import#readme) | [no-self-import](https://github.com/import-js/eslint-plugin-import/blob/v2.31.0/docs/rules/no-self-import.md)
Forbid a module from importing itself. | | | | -| [![import](./icons/icons8/import.png)](https://github.com/import-js/eslint-plugin-import#readme) | [no-unresolved](https://github.com/import-js/eslint-plugin-import/blob/v2.31.0/docs/rules/no-unresolved.md)
Ensure imports point to a file/module that can be resolved. | | | | -| [![promise](./icons/icons8/promise.png)](https://github.com/eslint-community/eslint-plugin-promise#readme) | [always-return](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/always-return.md)
Require returning inside each `then()` to create readable and reusable Promise chains. | | | | -| [![promise](./icons/icons8/promise.png)](https://github.com/eslint-community/eslint-plugin-promise#readme) | [catch-or-return](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/catch-or-return.md)
Enforce the use of `catch()` on un-returned promises. | | | ๐Ÿงช๐Ÿšซ | -| [![promise](./icons/icons8/promise.png)](https://github.com/eslint-community/eslint-plugin-promise#readme) | [no-new-statics](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-new-statics.md)
Disallow calling `new` on a Promise static method. | | ๐Ÿ”ง | | -| [![promise](./icons/icons8/promise.png)](https://github.com/eslint-community/eslint-plugin-promise#readme) | [no-return-wrap](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-return-wrap.md)
Disallow wrapping values in `Promise.resolve` or `Promise.reject` when not needed. | | | | -| [![promise](./icons/icons8/promise.png)](https://github.com/eslint-community/eslint-plugin-promise#readme) | [param-names](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/param-names.md)
Enforce consistent param names and ordering when creating new promises. | | | | -| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [max-switch-cases](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/max-switch-cases.md)
"switch" statements should not have too many "case" clauses | | | | -| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-all-duplicated-branches](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-all-duplicated-branches.md)
All branches in a conditional structure should not have exactly the same implementation | | | | -| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-collapsible-if](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-collapsible-if.md)
Collapsible "if" statements should be merged | | | | -| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-collection-size-mischeck](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-collection-size-mischeck.md)
Collection sizes and array length comparisons should make sense | | ๐Ÿ’ก | | -| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-duplicate-string](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-duplicate-string.md)
String literals should not be duplicated | | | ๐Ÿงช๐Ÿšซ | -| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-duplicated-branches](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-duplicated-branches.md)
Two branches in a conditional structure should not have exactly the same implementation | | | | -| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-element-overwrite](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-element-overwrite.md)
Collection elements should not be replaced unconditionally | | | | -| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-empty-collection](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-empty-collection.md)
Empty collections should not be accessed or iterated | | | | -| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-extra-arguments](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-extra-arguments.md)
Function calls should not pass extra arguments | | | | -| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-gratuitous-expressions](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-gratuitous-expressions.md)
Boolean expressions should not be gratuitous | | | | -| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-identical-conditions](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-identical-conditions.md)
Related "if-else-if" and "switch-case" statements should not have the same condition | | | | -| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-identical-expressions](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-identical-expressions.md)
Identical expressions should not be used on both sides of a binary operator | | | | -| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-identical-functions](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-identical-functions.md)
Functions should not have identical implementations | | | | -| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-ignored-return](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-ignored-return.md)
Return values from functions without side effects should not be ignored | | | | -| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-inverted-boolean-check](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-inverted-boolean-check.md)
Boolean checks should not be inverted | | ๐Ÿ”ง, ๐Ÿ’ก | | -| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-nested-switch](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-nested-switch.md)
"switch" statements should not be nested | | | | -| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-nested-template-literals](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-nested-template-literals.md)
Template literals should not be nested | | | | -| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-one-iteration-loop](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-one-iteration-loop.md)
Loops with at most one iteration should be refactored | | | | -| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-redundant-boolean](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-redundant-boolean.md)
Boolean literals should not be redundant | | | | -| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-redundant-jump](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-redundant-jump.md)
Jump statements should not be redundant | | ๐Ÿ’ก | | -| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-same-line-conditional](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-same-line-conditional.md)
Conditionals should start on new lines | | ๐Ÿ’ก | | -| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-small-switch](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-small-switch.md)
"switch" statements should have at least 3 "case" clauses | | | | -| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-unused-collection](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-unused-collection.md)
Collection and array contents should be used | | | | -| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-use-of-empty-return-value](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-use-of-empty-return-value.md)
The output of functions that don't return anything should not be used | | | | -| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-useless-catch](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-useless-catch.md)
"catch" clauses should do more than rethrow | | | | -| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [non-existent-operator](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/non-existent-operator.md)
Non-existent operators "=+", "=-" and "=!" should not be used | | ๐Ÿ’ก | | -| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [prefer-immediate-return](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/prefer-immediate-return.md)
Local variables should not be declared and then immediately returned or thrown | | ๐Ÿ”ง | | -| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [prefer-object-literal](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/prefer-object-literal.md)
Object literal syntax should be used | | | | -| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [prefer-single-boolean-return](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/prefer-single-boolean-return.md)
Return of boolean expressions should not be wrapped into an "if-then-else" statement | | ๐Ÿ’ก | | -| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [prefer-while](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/prefer-while.md)
A "while" loop should be used instead of a "for" loop | | ๐Ÿ”ง | | +| Plugin | Rule | Options | Autofix | Overrides | +| :--------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :-----: | :-------: | +| | [constructor-super](https://eslint.org/docs/latest/rules/constructor-super)
Require `super()` calls in constructors | | | | +| | [eqeqeq](https://eslint.org/docs/latest/rules/eqeqeq)
Require the use of `===` and `!==` |
always, null: never
[
  "always",
  {
    "null": "never"
  }
]
| ๐Ÿ”ง | | +| | [for-direction](https://eslint.org/docs/latest/rules/for-direction)
Enforce "for" loop update clause moving the counter in the right direction | | | | +| | [getter-return](https://eslint.org/docs/latest/rules/getter-return)
Enforce `return` statements in getters | | | | +| | [guard-for-in](https://eslint.org/docs/latest/rules/guard-for-in)
Require `for-in` loops to include an `if` statement | | | | +| | [no-async-promise-executor](https://eslint.org/docs/latest/rules/no-async-promise-executor)
Disallow using an async function as a Promise executor | | | | +| | [no-case-declarations](https://eslint.org/docs/latest/rules/no-case-declarations)
Disallow lexical declarations in case clauses | | ๐Ÿ’ก | | +| | [no-class-assign](https://eslint.org/docs/latest/rules/no-class-assign)
Disallow reassigning class members | | | | +| | [no-compare-neg-zero](https://eslint.org/docs/latest/rules/no-compare-neg-zero)
Disallow comparing against -0 | | | | +| | [no-cond-assign](https://eslint.org/docs/latest/rules/no-cond-assign)
Disallow assignment operators in conditional expressions | | | | +| | [no-const-assign](https://eslint.org/docs/latest/rules/no-const-assign)
Disallow reassigning `const` variables | | | | +| | [no-constant-binary-expression](https://eslint.org/docs/latest/rules/no-constant-binary-expression)
Disallow expressions where the operation doesn't affect the value | | | | +| | [no-constant-condition](https://eslint.org/docs/latest/rules/no-constant-condition)
Disallow constant expressions in conditions | | | | +| | [no-control-regex](https://eslint.org/docs/latest/rules/no-control-regex)
Disallow control characters in regular expressions | | | | +| | [no-debugger](https://eslint.org/docs/latest/rules/no-debugger)
Disallow the use of `debugger` | | | | +| | [no-delete-var](https://eslint.org/docs/latest/rules/no-delete-var)
Disallow deleting variables | | | | +| | [no-dupe-args](https://eslint.org/docs/latest/rules/no-dupe-args)
Disallow duplicate arguments in `function` definitions | | | | +| | [no-dupe-class-members](https://eslint.org/docs/latest/rules/no-dupe-class-members)
Disallow duplicate class members | | | | +| | [no-dupe-else-if](https://eslint.org/docs/latest/rules/no-dupe-else-if)
Disallow duplicate conditions in if-else-if chains | | | | +| | [no-dupe-keys](https://eslint.org/docs/latest/rules/no-dupe-keys)
Disallow duplicate keys in object literals | | | | +| | [no-duplicate-case](https://eslint.org/docs/latest/rules/no-duplicate-case)
Disallow duplicate case labels | | | | +| | [no-empty](https://eslint.org/docs/latest/rules/no-empty)
Disallow empty block statements | | ๐Ÿ’ก | | +| | [no-empty-character-class](https://eslint.org/docs/latest/rules/no-empty-character-class)
Disallow empty character classes in regular expressions | | | | +| | [no-empty-pattern](https://eslint.org/docs/latest/rules/no-empty-pattern)
Disallow empty destructuring patterns | | | | +| | [no-eval](https://eslint.org/docs/latest/rules/no-eval)
Disallow the use of `eval()` | | | | +| | [no-ex-assign](https://eslint.org/docs/latest/rules/no-ex-assign)
Disallow reassigning exceptions in `catch` clauses | | | | +| | [no-extra-boolean-cast](https://eslint.org/docs/latest/rules/no-extra-boolean-cast)
Disallow unnecessary boolean casts | | ๐Ÿ”ง | | +| | [no-fallthrough](https://eslint.org/docs/latest/rules/no-fallthrough)
Disallow fallthrough of `case` statements | | | | +| | [no-func-assign](https://eslint.org/docs/latest/rules/no-func-assign)
Disallow reassigning `function` declarations | | | | +| | [no-global-assign](https://eslint.org/docs/latest/rules/no-global-assign)
Disallow assignments to native objects or read-only global variables | | | | +| | [no-import-assign](https://eslint.org/docs/latest/rules/no-import-assign)
Disallow assigning to imported bindings | | | | +| | [no-inner-declarations](https://eslint.org/docs/latest/rules/no-inner-declarations)
Disallow variable or `function` declarations in nested blocks | | | | +| | [no-invalid-regexp](https://eslint.org/docs/latest/rules/no-invalid-regexp)
Disallow invalid regular expression strings in `RegExp` constructors | | | | +| | [no-irregular-whitespace](https://eslint.org/docs/latest/rules/no-irregular-whitespace)
Disallow irregular whitespace | | | | +| | [no-loss-of-precision](https://eslint.org/docs/latest/rules/no-loss-of-precision)
Disallow literal numbers that lose precision | | | | +| | [no-misleading-character-class](https://eslint.org/docs/latest/rules/no-misleading-character-class)
Disallow characters which are made with multiple code points in character class syntax | | ๐Ÿ’ก | | +| | [no-new-native-nonconstructor](https://eslint.org/docs/latest/rules/no-new-native-nonconstructor)
Disallow `new` operators with global non-constructor functions | | | | +| | [no-nonoctal-decimal-escape](https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape)
Disallow `\8` and `\9` escape sequences in string literals | | ๐Ÿ’ก | | +| | [no-obj-calls](https://eslint.org/docs/latest/rules/no-obj-calls)
Disallow calling global object properties as functions | | | | +| | [no-octal](https://eslint.org/docs/latest/rules/no-octal)
Disallow octal literals | | | | +| | [no-param-reassign](https://eslint.org/docs/latest/rules/no-param-reassign)
Disallow reassigning `function` parameters |
props: true
{
  "props": true
}
| | | +| | [no-prototype-builtins](https://eslint.org/docs/latest/rules/no-prototype-builtins)
Disallow calling some `Object.prototype` methods directly on objects | | ๐Ÿ’ก | | +| | [no-redeclare](https://eslint.org/docs/latest/rules/no-redeclare)
Disallow variable redeclaration | | | | +| | [no-regex-spaces](https://eslint.org/docs/latest/rules/no-regex-spaces)
Disallow multiple spaces in regular expressions | | ๐Ÿ”ง | | +| | [no-self-assign](https://eslint.org/docs/latest/rules/no-self-assign)
Disallow assignments where both sides are exactly the same | | | | +| | [no-sequences](https://eslint.org/docs/latest/rules/no-sequences)
Disallow comma operators | | | | +| | [no-setter-return](https://eslint.org/docs/latest/rules/no-setter-return)
Disallow returning values from setters | | | | +| | [no-shadow-restricted-names](https://eslint.org/docs/latest/rules/no-shadow-restricted-names)
Disallow identifiers from shadowing restricted names | | | | +| | [no-sparse-arrays](https://eslint.org/docs/latest/rules/no-sparse-arrays)
Disallow sparse arrays | | | | +| | [no-template-curly-in-string](https://eslint.org/docs/latest/rules/no-template-curly-in-string)
Disallow template literal placeholder syntax in regular strings | | | | +| | [no-this-before-super](https://eslint.org/docs/latest/rules/no-this-before-super)
Disallow `this`/`super` before calling `super()` in constructors | | | | +| | [no-undef](https://eslint.org/docs/latest/rules/no-undef)
Disallow the use of undeclared variables unless mentioned in `/*global */` comments | | | | +| | [no-unexpected-multiline](https://eslint.org/docs/latest/rules/no-unexpected-multiline)
Disallow confusing multiline expressions | | | | +| | [no-unreachable](https://eslint.org/docs/latest/rules/no-unreachable)
Disallow unreachable code after `return`, `throw`, `continue`, and `break` statements | | | | +| | [no-unreachable-loop](https://eslint.org/docs/latest/rules/no-unreachable-loop)
Disallow loops with a body that allows only one iteration | | | | +| | [no-unsafe-finally](https://eslint.org/docs/latest/rules/no-unsafe-finally)
Disallow control flow statements in `finally` blocks | | | | +| | [no-unsafe-negation](https://eslint.org/docs/latest/rules/no-unsafe-negation)
Disallow negating the left operand of relational operators | | ๐Ÿ’ก | | +| | [no-unsafe-optional-chaining](https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining)
Disallow use of optional chaining in contexts where the `undefined` value is not allowed | | | | +| | [no-unused-labels](https://eslint.org/docs/latest/rules/no-unused-labels)
Disallow unused labels | | ๐Ÿ”ง | | +| | [no-unused-vars](https://eslint.org/docs/latest/rules/no-unused-vars)
Disallow unused variables | | | | +| | [no-useless-backreference](https://eslint.org/docs/latest/rules/no-useless-backreference)
Disallow useless backreferences in regular expressions | | | | +| | [no-useless-catch](https://eslint.org/docs/latest/rules/no-useless-catch)
Disallow unnecessary `catch` clauses | | | | +| | [no-useless-escape](https://eslint.org/docs/latest/rules/no-useless-escape)
Disallow unnecessary escape characters | | ๐Ÿ’ก | | +| | [no-var](https://eslint.org/docs/latest/rules/no-var)
Require `let` or `const` instead of `var` | | ๐Ÿ”ง | | +| | [no-with](https://eslint.org/docs/latest/rules/no-with)
Disallow `with` statements | | | | +| | [prefer-const](https://eslint.org/docs/latest/rules/prefer-const)
Require `const` declarations for variables that are never reassigned after declared | | ๐Ÿ”ง | | +| | [prefer-rest-params](https://eslint.org/docs/latest/rules/prefer-rest-params)
Require rest parameters instead of `arguments` | | | | +| | [prefer-spread](https://eslint.org/docs/latest/rules/prefer-spread)
Require spread operators instead of `.apply()` | | | | +| | [require-yield](https://eslint.org/docs/latest/rules/require-yield)
Require generator functions to contain `yield` | | | | +| | [use-isnan](https://eslint.org/docs/latest/rules/use-isnan)
Require calls to `isNaN()` when checking for `NaN` | | ๐Ÿ’ก | | +| | [valid-typeof](https://eslint.org/docs/latest/rules/valid-typeof)
Enforce comparing `typeof` expressions against valid strings | | ๐Ÿ’ก | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [ban-ts-comment](https://typescript-eslint.io/rules/ban-ts-comment)
Disallow `@ts-` comments or require descriptions after directives | | ๐Ÿ’ก | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-array-constructor](https://typescript-eslint.io/rules/no-array-constructor)
Disallow generic `Array` constructors | | ๐Ÿ”ง | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-duplicate-enum-values](https://typescript-eslint.io/rules/no-duplicate-enum-values)
Disallow duplicate enum member values | | | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-empty-object-type](https://typescript-eslint.io/rules/no-empty-object-type)
Disallow accidentally using the "empty object" type | | ๐Ÿ’ก | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-explicit-any](https://typescript-eslint.io/rules/no-explicit-any)
Disallow the `any` type | | ๐Ÿ”ง, ๐Ÿ’ก | ๐Ÿงช๐Ÿšซ | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-extra-non-null-assertion](https://typescript-eslint.io/rules/no-extra-non-null-assertion)
Disallow extra non-null assertions | | ๐Ÿ”ง | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-misused-new](https://typescript-eslint.io/rules/no-misused-new)
Enforce valid definition of `new` and `constructor` | | | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-namespace](https://typescript-eslint.io/rules/no-namespace)
Disallow TypeScript namespaces | | | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-non-null-asserted-optional-chain](https://typescript-eslint.io/rules/no-non-null-asserted-optional-chain)
Disallow non-null assertions after an optional chain expression | | ๐Ÿ’ก | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-require-imports](https://typescript-eslint.io/rules/no-require-imports)
Disallow invocation of `require()` | | | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-this-alias](https://typescript-eslint.io/rules/no-this-alias)
Disallow aliasing `this` | | | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unnecessary-type-constraint](https://typescript-eslint.io/rules/no-unnecessary-type-constraint)
Disallow unnecessary constraints on generic types | | ๐Ÿ’ก | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unsafe-declaration-merging](https://typescript-eslint.io/rules/no-unsafe-declaration-merging)
Disallow unsafe declaration merging | | | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unsafe-function-type](https://typescript-eslint.io/rules/no-unsafe-function-type)
Disallow using the unsafe built-in Function type | | ๐Ÿ”ง | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unused-vars](https://typescript-eslint.io/rules/no-unused-vars)
Disallow unused variables |
argsIgnorePattern: ^_, dest...
{
  "argsIgnorePattern": "^_",
  "destructuredArrayIgnorePattern": "^_",
  "ignoreRestSiblings": true
}
| | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-wrapper-object-types](https://typescript-eslint.io/rules/no-wrapper-object-types)
Disallow using confusing built-in primitive class wrappers | | ๐Ÿ”ง | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [prefer-as-const](https://typescript-eslint.io/rules/prefer-as-const)
Enforce the use of `as const` over literal type | | ๐Ÿ”ง, ๐Ÿ’ก | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [triple-slash-reference](https://typescript-eslint.io/rules/triple-slash-reference)
Disallow certain triple slash directives in favor of ES6-style import declarations | | | | +| [![import](./icons/icons8/import.png)](https://github.com/import-js/eslint-plugin-import#readme) | [default](https://github.com/import-js/eslint-plugin-import/blob/v2.31.0/docs/rules/default.md)
Ensure a default export is present, given a default import. | | | | +| [![import](./icons/icons8/import.png)](https://github.com/import-js/eslint-plugin-import#readme) | [export](https://github.com/import-js/eslint-plugin-import/blob/v2.31.0/docs/rules/export.md)
Forbid any invalid exports, i.e. re-export of the same name. | | | | +| [![import](./icons/icons8/import.png)](https://github.com/import-js/eslint-plugin-import#readme) | [named](https://github.com/import-js/eslint-plugin-import/blob/v2.31.0/docs/rules/named.md)
Ensure named imports correspond to a named export in the remote file. | | | | +| [![import](./icons/icons8/import.png)](https://github.com/import-js/eslint-plugin-import#readme) | [namespace](https://github.com/import-js/eslint-plugin-import/blob/v2.31.0/docs/rules/namespace.md)
Ensure imported namespaces contain dereferenced properties as they are dereferenced. | | | | +| [![import](./icons/icons8/import.png)](https://github.com/import-js/eslint-plugin-import#readme) | [no-absolute-path](https://github.com/import-js/eslint-plugin-import/blob/v2.31.0/docs/rules/no-absolute-path.md)
Forbid import of modules using absolute paths. | | ๐Ÿ”ง | | +| [![import](./icons/icons8/import.png)](https://github.com/import-js/eslint-plugin-import#readme) | [no-amd](https://github.com/import-js/eslint-plugin-import/blob/v2.31.0/docs/rules/no-amd.md)
Forbid AMD `require` and `define` calls. | | | | +| [![import](./icons/icons8/import.png)](https://github.com/import-js/eslint-plugin-import#readme) | [no-commonjs](https://github.com/import-js/eslint-plugin-import/blob/v2.31.0/docs/rules/no-commonjs.md)
Forbid CommonJS `require` calls and `module.exports` or `exports.*`. | | | | +| [![import](./icons/icons8/import.png)](https://github.com/import-js/eslint-plugin-import#readme) | [no-cycle](https://github.com/import-js/eslint-plugin-import/blob/v2.31.0/docs/rules/no-cycle.md)
Forbid a module from importing a module with a dependency path back to itself. | | | | +| [![import](./icons/icons8/import.png)](https://github.com/import-js/eslint-plugin-import#readme) | [no-mutable-exports](https://github.com/import-js/eslint-plugin-import/blob/v2.31.0/docs/rules/no-mutable-exports.md)
Forbid the use of mutable exports with `var` or `let`. | | | | +| [![import](./icons/icons8/import.png)](https://github.com/import-js/eslint-plugin-import#readme) | [no-self-import](https://github.com/import-js/eslint-plugin-import/blob/v2.31.0/docs/rules/no-self-import.md)
Forbid a module from importing itself. | | | | +| [![import](./icons/icons8/import.png)](https://github.com/import-js/eslint-plugin-import#readme) | [no-unresolved](https://github.com/import-js/eslint-plugin-import/blob/v2.31.0/docs/rules/no-unresolved.md)
Ensure imports point to a file/module that can be resolved. | | | | +| [![promise](./icons/icons8/promise.png)](https://github.com/eslint-community/eslint-plugin-promise#readme) | [always-return](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/always-return.md)
Require returning inside each `then()` to create readable and reusable Promise chains. |
ignoreLastCallback: true
{
  "ignoreLastCallback": true
}
| | | +| [![promise](./icons/icons8/promise.png)](https://github.com/eslint-community/eslint-plugin-promise#readme) | [catch-or-return](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/catch-or-return.md)
Enforce the use of `catch()` on un-returned promises. | | | ๐Ÿงช๐Ÿšซ | +| [![promise](./icons/icons8/promise.png)](https://github.com/eslint-community/eslint-plugin-promise#readme) | [no-new-statics](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-new-statics.md)
Disallow calling `new` on a Promise static method. | | ๐Ÿ”ง | | +| [![promise](./icons/icons8/promise.png)](https://github.com/eslint-community/eslint-plugin-promise#readme) | [no-return-wrap](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-return-wrap.md)
Disallow wrapping values in `Promise.resolve` or `Promise.reject` when not needed. | | | | +| [![promise](./icons/icons8/promise.png)](https://github.com/eslint-community/eslint-plugin-promise#readme) | [param-names](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/param-names.md)
Enforce consistent param names and ordering when creating new promises. | | | | +| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-all-duplicated-branches](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-all-duplicated-branches.md)
All branches in a conditional structure should not have exactly the same implementation | | | | +| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-collection-size-mischeck](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-collection-size-mischeck.md)
Collection sizes and array length comparisons should make sense | | ๐Ÿ’ก | | +| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-duplicated-branches](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-duplicated-branches.md)
Two branches in a conditional structure should not have exactly the same implementation | | | | +| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-element-overwrite](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-element-overwrite.md)
Collection elements should not be replaced unconditionally | | | | +| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-empty-collection](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-empty-collection.md)
Empty collections should not be accessed or iterated | | | | +| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-extra-arguments](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-extra-arguments.md)
Function calls should not pass extra arguments | | | | +| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-gratuitous-expressions](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-gratuitous-expressions.md)
Boolean expressions should not be gratuitous | | | | +| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-identical-conditions](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-identical-conditions.md)
Related "if-else-if" and "switch-case" statements should not have the same condition | | | | +| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-identical-expressions](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-identical-expressions.md)
Identical expressions should not be used on both sides of a binary operator | | | | +| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-identical-functions](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-identical-functions.md)
Functions should not have identical implementations | | | | +| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-ignored-return](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-ignored-return.md)
Return values from functions without side effects should not be ignored | | | | +| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-one-iteration-loop](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-one-iteration-loop.md)
Loops with at most one iteration should be refactored | | | | +| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-unused-collection](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-unused-collection.md)
Collection and array contents should be used | | | | +| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-use-of-empty-return-value](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-use-of-empty-return-value.md)
The output of functions that don't return anything should not be used | | | | +| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [non-existent-operator](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/non-existent-operator.md)
Non-existent operators "=+", "=-" and "=!" should not be used | | ๐Ÿ’ก | | -### โš ๏ธ Warnings (150) +### โš ๏ธ Warnings (169) | Plugin | Rule | Options | Autofix | Overrides | | :--------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-----: | :-------: | @@ -164,11 +145,13 @@ Refer to [setup instructions in README](../README.md#๐Ÿ—๏ธ-setup). | | [max-depth](https://eslint.org/docs/latest/rules/max-depth)
Enforce a maximum depth that blocks can be nested | | | | | | [max-lines](https://eslint.org/docs/latest/rules/max-lines)
Enforce a maximum number of lines per file |
skipBlankLines: true, skipC...
{
  "skipBlankLines": true,
  "skipComments": true
}
| | ๐Ÿงช๐Ÿšซ | | | [max-lines-per-function](https://eslint.org/docs/latest/rules/max-lines-per-function)
Enforce a maximum number of lines of code in a function |
skipBlankLines: true, skipC...
{
  "skipBlankLines": true,
  "skipComments": true
}
| | ๐Ÿงช๐Ÿšซ | -| | [max-nested-callbacks](https://eslint.org/docs/latest/rules/max-nested-callbacks)
Enforce a maximum depth that callbacks can be nested |
max: 3
{
  "max": 3
}
| | | +| | [max-nested-callbacks](https://eslint.org/docs/latest/rules/max-nested-callbacks)
Enforce a maximum depth that callbacks can be nested |
max: 10
{
  "max": 10
}
| | | | | [no-bitwise](https://eslint.org/docs/latest/rules/no-bitwise)
Disallow bitwise operators | | | | | | [no-console](https://eslint.org/docs/latest/rules/no-console)
Disallow the use of `console` |
allow: error, warn, info
{
  "allow": [
    "error",
    "warn",
    "info"
  ]
}
| ๐Ÿ’ก | | | | [no-duplicate-imports](https://eslint.org/docs/latest/rules/no-duplicate-imports)
Disallow duplicate module imports | | | | +| | [no-empty-static-block](https://eslint.org/docs/latest/rules/no-empty-static-block)
Disallow empty static blocks | | | | | | [no-undef-init](https://eslint.org/docs/latest/rules/no-undef-init)
Disallow initializing variables to `undefined` | | ๐Ÿ”ง | | +| | [no-unused-private-class-members](https://eslint.org/docs/latest/rules/no-unused-private-class-members)
Disallow unused private class members | | | | | | [no-useless-rename](https://eslint.org/docs/latest/rules/no-useless-rename)
Disallow renaming import, export, and destructured assignments to the same name | | ๐Ÿ”ง | | | | [object-shorthand](https://eslint.org/docs/latest/rules/object-shorthand)
Require or disallow method and property shorthand syntax for object literals | | ๐Ÿ”ง | | | | [prefer-template](https://eslint.org/docs/latest/rules/prefer-template)
Require template literals instead of string concatenation | | ๐Ÿ”ง | | @@ -188,7 +171,9 @@ Refer to [setup instructions in README](../README.md#๐Ÿ—๏ธ-setup). | [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-import-type-side-effects](https://typescript-eslint.io/rules/no-import-type-side-effects)
Enforce the use of top-level import type qualifier when an import only has specifiers with inline type qualifiers | | ๐Ÿ”ง | | | [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-magic-numbers](https://typescript-eslint.io/rules/no-magic-numbers)
Disallow magic numbers |
ignore: -1, 0, 1, 2, 7, 10,...
{
  "ignore": [
    -1,
    0,
    1,
    2,
    7,
    10,
    24,
    60,
    100,
    1000,
    3600
  ],
  "ignoreClassFieldInitialValues": true,
  "ignoreDefaultValues": true,
  "ignoreEnums": true,
  "ignoreNumericLiteralTypes": true,
  "ignoreReadonlyClassProperties": true,
  "ignoreTypeIndexes": true,
  "enforceConst": true,
  "detectObjects": true
}
| | ๐Ÿงช๐Ÿšซ | | [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-shadow](https://typescript-eslint.io/rules/no-shadow)
Disallow variable declarations from shadowing variables declared in the outer scope | | | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unused-expressions](https://typescript-eslint.io/rules/no-unused-expressions)
Disallow unused expressions | | | | | [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [prefer-function-type](https://typescript-eslint.io/rules/prefer-function-type)
Enforce using function types instead of interfaces with call signatures | | ๐Ÿ”ง | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [prefer-namespace-keyword](https://typescript-eslint.io/rules/prefer-namespace-keyword)
Require using `namespace` keyword over `module` keyword to declare custom TypeScript modules | | ๐Ÿ”ง | | | [![functional](./icons/icons8/lambda.png)](https://github.com/eslint-functional/eslint-plugin-functional#readme) | [no-let](https://github.com/eslint-functional/eslint-plugin-functional/blob/v7.0.0/docs/rules/no-let.md)
Disallow mutable variables. | | | ๐Ÿงช๐Ÿšซ | | [![functional](./icons/icons8/lambda.png)](https://github.com/eslint-functional/eslint-plugin-functional#readme) | [no-loop-statements](https://github.com/eslint-functional/eslint-plugin-functional/blob/v7.0.0/docs/rules/no-loop-statements.md)
Disallow imperative loops. | | | | | [![import](./icons/icons8/import.png)](https://github.com/import-js/eslint-plugin-import#readme) | [max-dependencies](https://github.com/import-js/eslint-plugin-import/blob/v2.31.0/docs/rules/max-dependencies.md)
Enforce the maximum number of dependencies a module can have. |
ignoreTypeImports: true
{
  "ignoreTypeImports": true
}
| | | @@ -199,11 +184,26 @@ Refer to [setup instructions in README](../README.md#๐Ÿ—๏ธ-setup). | [![import](./icons/icons8/import.png)](https://github.com/import-js/eslint-plugin-import#readme) | [no-named-default](https://github.com/import-js/eslint-plugin-import/blob/v2.31.0/docs/rules/no-named-default.md)
Forbid named default exports. | | | | | [![import](./icons/icons8/import.png)](https://github.com/import-js/eslint-plugin-import#readme) | [no-unassigned-import](https://github.com/import-js/eslint-plugin-import/blob/v2.31.0/docs/rules/no-unassigned-import.md)
Forbid unassigned imports | | | | | [![import](./icons/icons8/import.png)](https://github.com/import-js/eslint-plugin-import#readme) | [no-useless-path-segments](https://github.com/import-js/eslint-plugin-import/blob/v2.31.0/docs/rules/no-useless-path-segments.md)
Forbid unnecessary path segments in import and require statements. | | ๐Ÿ”ง | | -| [![promise](./icons/icons8/promise.png)](https://github.com/eslint-community/eslint-plugin-promise#readme) | [no-callback-in-promise](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-callback-in-promise.md)
Disallow calling `cb()` inside of a `then()` (use [nodeify][] instead). | | | | +| [![promise](./icons/icons8/promise.png)](https://github.com/eslint-community/eslint-plugin-promise#readme) | [no-callback-in-promise](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-callback-in-promise.md)
Disallow calling `cb()` inside of a `then()` (use [nodeify][] instead). |
exceptions: next
{
  "exceptions": [
    "next"
  ]
}
| | | | [![promise](./icons/icons8/promise.png)](https://github.com/eslint-community/eslint-plugin-promise#readme) | [no-nesting](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-nesting.md)
Disallow nested `then()` or `catch()` statements. | | | | | [![promise](./icons/icons8/promise.png)](https://github.com/eslint-community/eslint-plugin-promise#readme) | [no-promise-in-callback](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-promise-in-callback.md)
Disallow using promises inside of callbacks. | | | | | [![promise](./icons/icons8/promise.png)](https://github.com/eslint-community/eslint-plugin-promise#readme) | [no-return-in-finally](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-return-in-finally.md)
Disallow return statements in `finally()`. | | | | | [![promise](./icons/icons8/promise.png)](https://github.com/eslint-community/eslint-plugin-promise#readme) | [valid-params](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/valid-params.md)
Enforces the proper number of arguments are passed to Promise functions. | | | | +| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [max-switch-cases](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/max-switch-cases.md)
"switch" statements should not have too many "case" clauses | | | | +| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-collapsible-if](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-collapsible-if.md)
Collapsible "if" statements should be merged | | | | +| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-duplicate-string](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-duplicate-string.md)
String literals should not be duplicated | | | ๐Ÿงช๐Ÿšซ | +| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-inverted-boolean-check](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-inverted-boolean-check.md)
Boolean checks should not be inverted | | ๐Ÿ”ง, ๐Ÿ’ก | | +| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-nested-switch](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-nested-switch.md)
"switch" statements should not be nested | | | | +| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-nested-template-literals](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-nested-template-literals.md)
Template literals should not be nested | | | | +| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-redundant-boolean](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-redundant-boolean.md)
Boolean literals should not be redundant | | | | +| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-redundant-jump](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-redundant-jump.md)
Jump statements should not be redundant | | ๐Ÿ’ก | | +| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-same-line-conditional](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-same-line-conditional.md)
Conditionals should start on new lines | | ๐Ÿ’ก | | +| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-small-switch](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-small-switch.md)
"switch" statements should have at least 3 "case" clauses | | | | +| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-useless-catch](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-useless-catch.md)
"catch" clauses should do more than rethrow | | | | +| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [prefer-immediate-return](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/prefer-immediate-return.md)
Local variables should not be declared and then immediately returned or thrown | | ๐Ÿ”ง | | +| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [prefer-object-literal](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/prefer-object-literal.md)
Object literal syntax should be used | | | | +| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [prefer-single-boolean-return](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/prefer-single-boolean-return.md)
Return of boolean expressions should not be wrapped into an "if-then-else" statement | | ๐Ÿ’ก | | +| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [prefer-while](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/prefer-while.md)
A "while" loop should be used instead of a "for" loop | | ๐Ÿ”ง | | | [![unicorn](./icons/icons8/unicorn.png)](https://github.com/sindresorhus/eslint-plugin-unicorn#readme) | [better-regex](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v50.0.0/docs/rules/better-regex.md)
Improve regexes by making them shorter, consistent, and safer. |
sortCharacterClasses: false
{
  "sortCharacterClasses": false
}
| ๐Ÿ”ง | | | [![unicorn](./icons/icons8/unicorn.png)](https://github.com/sindresorhus/eslint-plugin-unicorn#readme) | [catch-error-name](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v50.0.0/docs/rules/catch-error-name.md)
Enforce a specific parameter name in catch clauses. | | ๐Ÿ”ง | | | [![unicorn](./icons/icons8/unicorn.png)](https://github.com/sindresorhus/eslint-plugin-unicorn#readme) | [consistent-destructuring](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v50.0.0/docs/rules/consistent-destructuring.md)
Use destructured variables over properties. | | ๐Ÿ”ง, ๐Ÿ’ก | | diff --git a/docs/jest.md b/docs/jest.md index 6cb5890..40c5588 100644 --- a/docs/jest.md +++ b/docs/jest.md @@ -33,37 +33,37 @@ Config for projects using **Jest** for testing. > ๐Ÿ”ง Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).
๐Ÿ’ก Manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions). -### ๐Ÿšจ Errors (16) +### ๐Ÿšจ Errors (8) | Plugin | Rule | Options | Autofix | Overrides | | :-----------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------ | :-----: | :-------: | -| [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [no-alias-methods](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/no-alias-methods.md)
Disallow alias methods | | ๐Ÿ”ง | | -| [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [no-conditional-expect](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/no-conditional-expect.md)
Disallow calling `expect` conditionally | | | | -| [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [no-deprecated-functions](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/no-deprecated-functions.md)
Disallow use of deprecated functions | | ๐Ÿ”ง | | -| [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [no-done-callback](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/no-done-callback.md)
Disallow using a callback in asynchronous tests and hooks | | ๐Ÿ’ก | | -| [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [no-export](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/no-export.md)
Disallow using `exports` in files containing tests | | | | -| [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [no-focused-tests](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/no-focused-tests.md)
Disallow focused tests | | ๐Ÿ’ก | | | [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [no-identical-title](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/no-identical-title.md)
Disallow identical titles | | | | | [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [no-interpolation-in-snapshots](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/no-interpolation-in-snapshots.md)
Disallow string interpolation inside snapshots | | | | | [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [no-jasmine-globals](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/no-jasmine-globals.md)
Disallow Jasmine globals | | ๐Ÿ”ง | | -| [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [no-mocks-import](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/no-mocks-import.md)
Disallow manually importing from `__mocks__` | | | | -| [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [no-standalone-expect](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/no-standalone-expect.md)
Disallow using `expect` outside of `it` or `test` blocks | | | | | [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [no-test-prefixes](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/no-test-prefixes.md)
Require using `.only` and `.skip` over `f` and `x` | | ๐Ÿ”ง | | | [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [valid-describe-callback](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/valid-describe-callback.md)
Enforce valid `describe()` callback | | | | | [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [valid-expect](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/valid-expect.md)
Enforce valid `expect()` usage | | ๐Ÿ”ง | | | [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [valid-expect-in-promise](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/valid-expect-in-promise.md)
Require promises that have expectations in their chain to be valid | | | | | [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [valid-title](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/valid-title.md)
Enforce valid titles | | ๐Ÿ”ง | | -### โš ๏ธ Warnings (27) +### โš ๏ธ Warnings (35) | Plugin | Rule | Options | Autofix | Overrides | | :-----------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------- | :-----: | :-------: | | [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [consistent-test-it](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/consistent-test-it.md)
Enforce `test` and `it` usage conventions | | ๐Ÿ”ง | | | [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [expect-expect](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/expect-expect.md)
Enforce assertion to be made in a test body | | | | | [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [max-nested-describe](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/max-nested-describe.md)
Enforces a maximum depth to nested describe calls |
max: 2
{
  "max": 2
}
| | | +| [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [no-alias-methods](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/no-alias-methods.md)
Disallow alias methods | | ๐Ÿ”ง | | | [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [no-commented-out-tests](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/no-commented-out-tests.md)
Disallow commented out tests | | | | +| [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [no-conditional-expect](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/no-conditional-expect.md)
Disallow calling `expect` conditionally | | | | +| [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [no-deprecated-functions](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/no-deprecated-functions.md)
Disallow use of deprecated functions | | ๐Ÿ”ง | | | [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [no-disabled-tests](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/no-disabled-tests.md)
Disallow disabled tests | | | | +| [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [no-done-callback](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/no-done-callback.md)
Disallow using a callback in asynchronous tests and hooks | | ๐Ÿ’ก | | | [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [no-duplicate-hooks](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/no-duplicate-hooks.md)
Disallow duplicate setup and teardown hooks | | | | +| [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [no-export](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/no-export.md)
Disallow using `exports` in files containing tests | | | | +| [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [no-focused-tests](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/no-focused-tests.md)
Disallow focused tests | | ๐Ÿ’ก | | +| [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [no-mocks-import](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/no-mocks-import.md)
Disallow manually importing from `__mocks__` | | | | +| [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [no-standalone-expect](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/no-standalone-expect.md)
Disallow using `expect` outside of `it` or `test` blocks | | | | | [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [no-test-return-statement](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/no-test-return-statement.md)
Disallow explicitly returning from tests | | | | | [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [padding-around-after-all-blocks](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/padding-around-after-all-blocks.md)
Enforce padding around `afterAll` blocks | | ๐Ÿ”ง | | | [![jest](./icons/material/jest.png)](https://github.com/jest-community/eslint-plugin-jest#readme) | [padding-around-after-each-blocks](https://github.com/jest-community/eslint-plugin-jest/blob/v28.8.0/docs/rules/padding-around-after-each-blocks.md)
Enforce padding around `afterEach` blocks | | ๐Ÿ”ง | | diff --git a/docs/typescript.md b/docs/typescript.md index 94e74b0..6af9a54 100644 --- a/docs/typescript.md +++ b/docs/typescript.md @@ -71,67 +71,67 @@ Config for strict **TypeScript** projects. > ๐Ÿ”ง Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).
๐Ÿ’ก Manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).
๐Ÿงช๐Ÿšซ Disabled for [test files](../README.md#๐Ÿงช-test-overrides).
๐Ÿงชโš ๏ธ Severity lessened to warning for [test files](../README.md#๐Ÿงช-test-overrides). -### ๐Ÿšจ Errors (47) +### ๐Ÿšจ Errors (35) -| Plugin | Rule | Options | Autofix | Overrides | -| :--------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-----: | :-------: | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [await-thenable](https://typescript-eslint.io/rules/await-thenable)
Disallow awaiting a value that is not a Thenable | | ๐Ÿ’ก | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [consistent-type-assertions](https://typescript-eslint.io/rules/consistent-type-assertions)
Enforce consistent usage of type assertions |
assertionStyle: as, objectL...
{
  "assertionStyle": "as",
  "objectLiteralTypeAssertions": "never"
}
| ๐Ÿ”ง, ๐Ÿ’ก | ๐Ÿงชโš ๏ธ | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-array-delete](https://typescript-eslint.io/rules/no-array-delete)
Disallow using the `delete` operator on array values | | ๐Ÿ’ก | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-base-to-string](https://typescript-eslint.io/rules/no-base-to-string)
Require `.toString()` and `.toLocaleString()` to only be called on objects which provide useful information when stringified | | | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-confusing-void-expression](https://typescript-eslint.io/rules/no-confusing-void-expression)
Require expressions of type void to appear in statement position | | ๐Ÿ”ง, ๐Ÿ’ก | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-deprecated](https://typescript-eslint.io/rules/no-deprecated)
Disallow using code marked as `@deprecated` | | | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-duplicate-type-constituents](https://typescript-eslint.io/rules/no-duplicate-type-constituents)
Disallow duplicate constituents of union or intersection types | | ๐Ÿ”ง | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-dynamic-delete](https://typescript-eslint.io/rules/no-dynamic-delete)
Disallow using the `delete` operator on computed key expressions | | ๐Ÿ”ง | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-extraneous-class](https://typescript-eslint.io/rules/no-extraneous-class)
Disallow classes used as namespaces | | | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-floating-promises](https://typescript-eslint.io/rules/no-floating-promises)
Require Promise-like statements to be handled appropriately | | ๐Ÿ’ก | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-for-in-array](https://typescript-eslint.io/rules/no-for-in-array)
Disallow iterating over an array with a for-in loop | | | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-implied-eval](https://typescript-eslint.io/rules/no-implied-eval)
Disallow the use of `eval()`-like methods | | | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-invalid-void-type](https://typescript-eslint.io/rules/no-invalid-void-type)
Disallow `void` type outside of generic or return types | | | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-meaningless-void-operator](https://typescript-eslint.io/rules/no-meaningless-void-operator)
Disallow the `void` operator except when used to discard a value | | ๐Ÿ”ง, ๐Ÿ’ก | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-misused-promises](https://typescript-eslint.io/rules/no-misused-promises)
Disallow Promises in places not designed to handle them | | | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-mixed-enums](https://typescript-eslint.io/rules/no-mixed-enums)
Disallow enums from having both number and string members | | | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-non-null-asserted-nullish-coalescing](https://typescript-eslint.io/rules/no-non-null-asserted-nullish-coalescing)
Disallow non-null assertions in the left operand of a nullish coalescing operator | | ๐Ÿ’ก | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-non-null-assertion](https://typescript-eslint.io/rules/no-non-null-assertion)
Disallow non-null assertions using the `!` postfix operator | | ๐Ÿ’ก | ๐Ÿงช๐Ÿšซ | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-redundant-type-constituents](https://typescript-eslint.io/rules/no-redundant-type-constituents)
Disallow members of unions and intersections that do nothing or override type information | | | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unnecessary-boolean-literal-compare](https://typescript-eslint.io/rules/no-unnecessary-boolean-literal-compare)
Disallow unnecessary equality comparisons against boolean literals | | ๐Ÿ”ง | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unnecessary-condition](https://typescript-eslint.io/rules/no-unnecessary-condition)
Disallow conditionals where the type is always truthy or always falsy | | ๐Ÿ”ง | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unnecessary-template-expression](https://typescript-eslint.io/rules/no-unnecessary-template-expression)
Disallow unnecessary template expressions | | ๐Ÿ”ง | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unnecessary-type-arguments](https://typescript-eslint.io/rules/no-unnecessary-type-arguments)
Disallow type arguments that are equal to the default | | ๐Ÿ”ง | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unnecessary-type-assertion](https://typescript-eslint.io/rules/no-unnecessary-type-assertion)
Disallow type assertions that do not change the type of an expression | | ๐Ÿ”ง | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unnecessary-type-parameters](https://typescript-eslint.io/rules/no-unnecessary-type-parameters)
Disallow type parameters that aren't used multiple times | | ๐Ÿ’ก | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unsafe-argument](https://typescript-eslint.io/rules/no-unsafe-argument)
Disallow calling a function with a value with type `any` | | | ๐Ÿงช๐Ÿšซ | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unsafe-assignment](https://typescript-eslint.io/rules/no-unsafe-assignment)
Disallow assigning a value with type `any` to variables and properties | | | ๐Ÿงช๐Ÿšซ | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unsafe-call](https://typescript-eslint.io/rules/no-unsafe-call)
Disallow calling a value with type `any` | | | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unsafe-enum-comparison](https://typescript-eslint.io/rules/no-unsafe-enum-comparison)
Disallow comparing an enum value with a non-enum value | | ๐Ÿ’ก | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unsafe-member-access](https://typescript-eslint.io/rules/no-unsafe-member-access)
Disallow member access on a value with type `any` | | | ๐Ÿงช๐Ÿšซ | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unsafe-return](https://typescript-eslint.io/rules/no-unsafe-return)
Disallow returning a value with type `any` from a function | | | ๐Ÿงช๐Ÿšซ | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unsafe-unary-minus](https://typescript-eslint.io/rules/no-unsafe-unary-minus)
Require unary negation to take a number | | | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-useless-constructor](https://typescript-eslint.io/rules/no-useless-constructor)
Disallow unnecessary constructors | | ๐Ÿ’ก | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [non-nullable-type-assertion-style](https://typescript-eslint.io/rules/non-nullable-type-assertion-style)
Enforce non-null assertions over explicit type casts | | ๐Ÿ”ง | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [only-throw-error](https://typescript-eslint.io/rules/only-throw-error)
Disallow throwing non-`Error` values as exceptions | | | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [prefer-literal-enum-member](https://typescript-eslint.io/rules/prefer-literal-enum-member)
Require all enum members to be literal values | | | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [prefer-promise-reject-errors](https://typescript-eslint.io/rules/prefer-promise-reject-errors)
Require using Error objects as Promise rejection reasons | | | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [prefer-reduce-type-parameter](https://typescript-eslint.io/rules/prefer-reduce-type-parameter)
Enforce using type parameter when calling `Array#reduce` instead of casting | | ๐Ÿ”ง | ๐Ÿงช๐Ÿšซ | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [prefer-return-this-type](https://typescript-eslint.io/rules/prefer-return-this-type)
Enforce that `this` is used when only `this` type is returned | | ๐Ÿ”ง | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [require-await](https://typescript-eslint.io/rules/require-await)
Disallow async functions which do not return promises and have no `await` expression | | ๐Ÿ’ก | ๐Ÿงชโš ๏ธ | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [restrict-plus-operands](https://typescript-eslint.io/rules/restrict-plus-operands)
Require both operands of addition to be the same type and be `bigint`, `number`, or `string` | | | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [restrict-template-expressions](https://typescript-eslint.io/rules/restrict-template-expressions)
Enforce template literal expressions to be of `string` type | | | ๐Ÿงช๐Ÿšซ | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [return-await](https://typescript-eslint.io/rules/return-await)
Enforce consistent awaiting of returned promises |
error-handling-correctness-...
"error-handling-correctness-only"
| ๐Ÿ”ง, ๐Ÿ’ก | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [unbound-method](https://typescript-eslint.io/rules/unbound-method)
Enforce unbound methods are called with their expected scope | | | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [unified-signatures](https://typescript-eslint.io/rules/unified-signatures)
Disallow two overloads that could be unified into one with a union or an optional/rest parameter | | | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [use-unknown-in-catch-callback-variable](https://typescript-eslint.io/rules/use-unknown-in-catch-callback-variable)
Enforce typing arguments in Promise rejection callbacks as `unknown` | | ๐Ÿ”ง, ๐Ÿ’ก | | -| [![functional](./icons/icons8/lambda.png)](https://github.com/eslint-functional/eslint-plugin-functional#readme) | [immutable-data](https://github.com/eslint-functional/eslint-plugin-functional/blob/v7.0.0/docs/rules/immutable-data.md)
Enforce treating data as immutable. |
ignoreImmediateMutation: tr...
{
  "ignoreImmediateMutation": true,
  "ignoreClasses": true,
  "ignoreAccessorPattern": "module.exports"
}
| | ๐Ÿงชโš ๏ธ | +| Plugin | Rule | Options | Autofix | Overrides | +| :-------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-----: | :-------: | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [await-thenable](https://typescript-eslint.io/rules/await-thenable)
Disallow awaiting a value that is not a Thenable | | ๐Ÿ’ก | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-array-delete](https://typescript-eslint.io/rules/no-array-delete)
Disallow using the `delete` operator on array values | | ๐Ÿ’ก | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-base-to-string](https://typescript-eslint.io/rules/no-base-to-string)
Require `.toString()` and `.toLocaleString()` to only be called on objects which provide useful information when stringified | | | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-deprecated](https://typescript-eslint.io/rules/no-deprecated)
Disallow using code marked as `@deprecated` | | | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-duplicate-type-constituents](https://typescript-eslint.io/rules/no-duplicate-type-constituents)
Disallow duplicate constituents of union or intersection types | | ๐Ÿ”ง | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-dynamic-delete](https://typescript-eslint.io/rules/no-dynamic-delete)
Disallow using the `delete` operator on computed key expressions | | ๐Ÿ”ง | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-extraneous-class](https://typescript-eslint.io/rules/no-extraneous-class)
Disallow classes used as namespaces | | | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-floating-promises](https://typescript-eslint.io/rules/no-floating-promises)
Require Promise-like statements to be handled appropriately | | ๐Ÿ’ก | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-for-in-array](https://typescript-eslint.io/rules/no-for-in-array)
Disallow iterating over an array with a for-in loop | | | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-implied-eval](https://typescript-eslint.io/rules/no-implied-eval)
Disallow the use of `eval()`-like methods | | | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-invalid-void-type](https://typescript-eslint.io/rules/no-invalid-void-type)
Disallow `void` type outside of generic or return types | | | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-misused-promises](https://typescript-eslint.io/rules/no-misused-promises)
Disallow Promises in places not designed to handle them | | | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-mixed-enums](https://typescript-eslint.io/rules/no-mixed-enums)
Disallow enums from having both number and string members | | | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-non-null-asserted-nullish-coalescing](https://typescript-eslint.io/rules/no-non-null-asserted-nullish-coalescing)
Disallow non-null assertions in the left operand of a nullish coalescing operator | | ๐Ÿ’ก | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-non-null-assertion](https://typescript-eslint.io/rules/no-non-null-assertion)
Disallow non-null assertions using the `!` postfix operator | | ๐Ÿ’ก | ๐Ÿงช๐Ÿšซ | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-redundant-type-constituents](https://typescript-eslint.io/rules/no-redundant-type-constituents)
Disallow members of unions and intersections that do nothing or override type information | | | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unnecessary-type-assertion](https://typescript-eslint.io/rules/no-unnecessary-type-assertion)
Disallow type assertions that do not change the type of an expression | | ๐Ÿ”ง | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unnecessary-type-parameters](https://typescript-eslint.io/rules/no-unnecessary-type-parameters)
Disallow type parameters that aren't used multiple times | | ๐Ÿ’ก | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unsafe-argument](https://typescript-eslint.io/rules/no-unsafe-argument)
Disallow calling a function with a value with type `any` | | | ๐Ÿงช๐Ÿšซ | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unsafe-assignment](https://typescript-eslint.io/rules/no-unsafe-assignment)
Disallow assigning a value with type `any` to variables and properties | | | ๐Ÿงช๐Ÿšซ | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unsafe-call](https://typescript-eslint.io/rules/no-unsafe-call)
Disallow calling a value with type `any` | | | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unsafe-enum-comparison](https://typescript-eslint.io/rules/no-unsafe-enum-comparison)
Disallow comparing an enum value with a non-enum value | | ๐Ÿ’ก | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unsafe-member-access](https://typescript-eslint.io/rules/no-unsafe-member-access)
Disallow member access on a value with type `any` | | | ๐Ÿงช๐Ÿšซ | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unsafe-return](https://typescript-eslint.io/rules/no-unsafe-return)
Disallow returning a value with type `any` from a function | | | ๐Ÿงช๐Ÿšซ | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unsafe-unary-minus](https://typescript-eslint.io/rules/no-unsafe-unary-minus)
Require unary negation to take a number | | | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-useless-constructor](https://typescript-eslint.io/rules/no-useless-constructor)
Disallow unnecessary constructors | | ๐Ÿ’ก | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [non-nullable-type-assertion-style](https://typescript-eslint.io/rules/non-nullable-type-assertion-style)
Enforce non-null assertions over explicit type casts | | ๐Ÿ”ง | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [only-throw-error](https://typescript-eslint.io/rules/only-throw-error)
Disallow throwing non-`Error` values as exceptions | | | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [prefer-literal-enum-member](https://typescript-eslint.io/rules/prefer-literal-enum-member)
Require all enum members to be literal values | | | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [restrict-plus-operands](https://typescript-eslint.io/rules/restrict-plus-operands)
Require both operands of addition to be the same type and be `bigint`, `number`, or `string` | | | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [restrict-template-expressions](https://typescript-eslint.io/rules/restrict-template-expressions)
Enforce template literal expressions to be of `string` type |
allowBoolean: true, allowNu...
{
  "allowBoolean": true,
  "allowNumber": true
}
| | ๐Ÿงช๐Ÿšซ | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [return-await](https://typescript-eslint.io/rules/return-await)
Enforce consistent awaiting of returned promises |
error-handling-correctness-...
"error-handling-correctness-only"
| ๐Ÿ”ง, ๐Ÿ’ก | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [unbound-method](https://typescript-eslint.io/rules/unbound-method)
Enforce unbound methods are called with their expected scope | | | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [unified-signatures](https://typescript-eslint.io/rules/unified-signatures)
Disallow two overloads that could be unified into one with a union or an optional/rest parameter | | | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [use-unknown-in-catch-callback-variable](https://typescript-eslint.io/rules/use-unknown-in-catch-callback-variable)
Enforce typing arguments in Promise rejection callbacks as `unknown` | | ๐Ÿ”ง, ๐Ÿ’ก | | -### โš ๏ธ Warnings (8) +### โš ๏ธ Warnings (20) -| Plugin | Rule | Options | Autofix | Overrides | -| :--------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-----: | :-------: | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [dot-notation](https://typescript-eslint.io/rules/dot-notation)
Enforce dot notation whenever possible |
allowIndexSignatureProperty...
{
  "allowIndexSignaturePropertyAccess": true
}
| ๐Ÿ”ง | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [naming-convention](https://typescript-eslint.io/rules/naming-convention)
Enforce naming conventions for everything across a codebase |
selector: variableLike, met...
[
  {
    "selector": [
      "variableLike",
      "method",
      "typeProperty",
      "parameterProperty",
      "classProperty"
    ],
    "format": [
      "camelCase"
    ]
  },
  {
    "selector": "variable",
    "format": [
      "camelCase",
      "UPPER_CASE"
    ]
  },
  {
    "selector": "typeLike",
    "format": [
      "PascalCase"
    ]
  },
  {
    "selector": "enumMember",
    "format": [
      "PascalCase"
    ]
  },
  {
    "selector": "parameter",
    "modifiers": [
      "unused"
    ],
    "format": null,
    "custom": {
      "regex": "^(_+\|[a-z][a-zA-Z0-9]\*)$",
      "match": true
    }
  },
  {
    "selector": "objectLiteralProperty",
    "modifiers": [
      "requiresQuotes"
    ],
    "format": null
  },
  {
    "selector": [
      "variable",
      "parameter"
    ],
    "modifiers": [
      "destructured"
    ],
    "format": null
  }
]
| | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [prefer-includes](https://typescript-eslint.io/rules/prefer-includes)
Enforce `includes` method over `indexOf` method | | ๐Ÿ”ง | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [prefer-nullish-coalescing](https://typescript-eslint.io/rules/prefer-nullish-coalescing)
Enforce using the nullish coalescing operator instead of logical assignments or chaining |
ignorePrimitives: {"string"...
{
  "ignorePrimitives": {
    "string": true
  }
}
| ๐Ÿ’ก | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [prefer-optional-chain](https://typescript-eslint.io/rules/prefer-optional-chain)
Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects | | ๐Ÿ”ง, ๐Ÿ’ก | | -| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [prefer-string-starts-ends-with](https://typescript-eslint.io/rules/prefer-string-starts-ends-with)
Enforce using `String#startsWith` and `String#endsWith` over other equivalent methods of checking substrings | | ๐Ÿ”ง | | -| [![functional](./icons/icons8/lambda.png)](https://github.com/eslint-functional/eslint-plugin-functional#readme) | [prefer-property-signatures](https://github.com/eslint-functional/eslint-plugin-functional/blob/v7.0.0/docs/rules/prefer-property-signatures.md)
Prefer property signatures over method signatures. | | | | -| [![functional](./icons/icons8/lambda.png)](https://github.com/eslint-functional/eslint-plugin-functional#readme) | [prefer-tacit](https://github.com/eslint-functional/eslint-plugin-functional/blob/v7.0.0/docs/rules/prefer-tacit.md)
Replaces `x => f(x)` with just `f`. | | ๐Ÿ’ก | | +| Plugin | Rule | Options | Autofix | Overrides | +| :--------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-----: | :-------: | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [consistent-type-assertions](https://typescript-eslint.io/rules/consistent-type-assertions)
Enforce consistent usage of type assertions |
assertionStyle: as, objectL...
{
  "assertionStyle": "as",
  "objectLiteralTypeAssertions": "allow"
}
| ๐Ÿ”ง, ๐Ÿ’ก | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [dot-notation](https://typescript-eslint.io/rules/dot-notation)
Enforce dot notation whenever possible |
allowPrivateClassPropertyAc...
{
  "allowPrivateClassPropertyAccess": true,
  "allowProtectedClassPropertyAccess": true,
  "allowIndexSignaturePropertyAccess": true
}
| ๐Ÿ”ง | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [naming-convention](https://typescript-eslint.io/rules/naming-convention)
Enforce naming conventions for everything across a codebase |
selector: variableLike, met...
[
  {
    "selector": [
      "variableLike",
      "method",
      "typeProperty",
      "parameterProperty",
      "classProperty"
    ],
    "format": [
      "camelCase"
    ]
  },
  {
    "selector": "variable",
    "format": [
      "camelCase",
      "UPPER_CASE",
      "PascalCase"
    ]
  },
  {
    "selector": "typeLike",
    "format": [
      "PascalCase"
    ]
  },
  {
    "selector": "enumMember",
    "format": [
      "PascalCase"
    ]
  },
  {
    "selector": "parameter",
    "modifiers": [
      "unused"
    ],
    "format": null,
    "custom": {
      "regex": "^(_+\|[a-z][a-zA-Z0-9]\*)$",
      "match": true
    }
  },
  {
    "selector": "objectLiteralProperty",
    "modifiers": [
      "requiresQuotes"
    ],
    "format": null
  },
  {
    "selector": [
      "variable",
      "parameter"
    ],
    "modifiers": [
      "destructured"
    ],
    "format": null
  }
]
| | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-confusing-void-expression](https://typescript-eslint.io/rules/no-confusing-void-expression)
Require expressions of type void to appear in statement position | | ๐Ÿ”ง, ๐Ÿ’ก | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-meaningless-void-operator](https://typescript-eslint.io/rules/no-meaningless-void-operator)
Disallow the `void` operator except when used to discard a value | | ๐Ÿ”ง, ๐Ÿ’ก | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unnecessary-boolean-literal-compare](https://typescript-eslint.io/rules/no-unnecessary-boolean-literal-compare)
Disallow unnecessary equality comparisons against boolean literals | | ๐Ÿ”ง | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unnecessary-condition](https://typescript-eslint.io/rules/no-unnecessary-condition)
Disallow conditionals where the type is always truthy or always falsy | | ๐Ÿ”ง | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unnecessary-template-expression](https://typescript-eslint.io/rules/no-unnecessary-template-expression)
Disallow unnecessary template expressions | | ๐Ÿ”ง | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [no-unnecessary-type-arguments](https://typescript-eslint.io/rules/no-unnecessary-type-arguments)
Disallow type arguments that are equal to the default | | ๐Ÿ”ง | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [prefer-includes](https://typescript-eslint.io/rules/prefer-includes)
Enforce `includes` method over `indexOf` method | | ๐Ÿ”ง | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [prefer-nullish-coalescing](https://typescript-eslint.io/rules/prefer-nullish-coalescing)
Enforce using the nullish coalescing operator instead of logical assignments or chaining |
ignorePrimitives: {"string"...
{
  "ignorePrimitives": {
    "string": true
  }
}
| ๐Ÿ’ก | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [prefer-optional-chain](https://typescript-eslint.io/rules/prefer-optional-chain)
Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects | | ๐Ÿ”ง, ๐Ÿ’ก | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [prefer-promise-reject-errors](https://typescript-eslint.io/rules/prefer-promise-reject-errors)
Require using Error objects as Promise rejection reasons | | | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [prefer-reduce-type-parameter](https://typescript-eslint.io/rules/prefer-reduce-type-parameter)
Enforce using type parameter when calling `Array#reduce` instead of casting | | ๐Ÿ”ง | ๐Ÿงช๐Ÿšซ | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [prefer-return-this-type](https://typescript-eslint.io/rules/prefer-return-this-type)
Enforce that `this` is used when only `this` type is returned | | ๐Ÿ”ง | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [prefer-string-starts-ends-with](https://typescript-eslint.io/rules/prefer-string-starts-ends-with)
Enforce using `String#startsWith` and `String#endsWith` over other equivalent methods of checking substrings | | ๐Ÿ”ง | | +| [![@typescript-eslint](./icons/material/typescript.png)](https://typescript-eslint.io/) | [require-await](https://typescript-eslint.io/rules/require-await)
Disallow async functions which do not return promises and have no `await` expression | | ๐Ÿ’ก | | +| [![functional](./icons/icons8/lambda.png)](https://github.com/eslint-functional/eslint-plugin-functional#readme) | [immutable-data](https://github.com/eslint-functional/eslint-plugin-functional/blob/v7.0.0/docs/rules/immutable-data.md)
Enforce treating data as immutable. |
ignoreImmediateMutation: tr...
{
  "ignoreImmediateMutation": true,
  "ignoreClasses": true,
  "ignoreAccessorPattern": "module.exports"
}
| | | +| [![functional](./icons/icons8/lambda.png)](https://github.com/eslint-functional/eslint-plugin-functional#readme) | [prefer-property-signatures](https://github.com/eslint-functional/eslint-plugin-functional/blob/v7.0.0/docs/rules/prefer-property-signatures.md)
Prefer property signatures over method signatures. | | | | +| [![functional](./icons/icons8/lambda.png)](https://github.com/eslint-functional/eslint-plugin-functional#readme) | [prefer-tacit](https://github.com/eslint-functional/eslint-plugin-functional/blob/v7.0.0/docs/rules/prefer-tacit.md)
Replaces `x => f(x)` with just `f`. | | ๐Ÿ’ก | | diff --git a/scripts/docs.js b/scripts/docs.js index e831d70..d07b117 100644 --- a/scripts/docs.js +++ b/scripts/docs.js @@ -164,10 +164,18 @@ async function generateConfigDocs(config, allConfigs, peerDeps) { const markdown = configRulesToMarkdown( config.name, ruleIds.map(id => { - const entry = findRuleEntry( - config.flatConfig.filter(({ files }) => files !== TEST_FILE_PATTERNS), - id, - ); + const entry = + findRuleEntry( + config.flatConfig.filter( + ({ name }) => + name?.startsWith('code-pushup/') && name.endsWith('/customized'), + ), + id, + ) ?? + findRuleEntry( + config.flatConfig.filter(({ files }) => files !== TEST_FILE_PATTERNS), + id, + ); if (entry == null) { throw new Error( `Internal logic error - no entry found for rule ${id} in ${config.name} config`, diff --git a/src/configs/graphql.js b/src/configs/graphql.js index 8ea7993..87ab7d3 100644 --- a/src/configs/graphql.js +++ b/src/configs/graphql.js @@ -27,6 +27,11 @@ export default tseslint.config(...node, { 'error', { listTypeCanWrapOnlyEdgeType: false }, ], + }, + }, + { + name: 'code-pushup/graphql/disabled', + rules: { '@graphql-eslint/strict-id-in-types': 'off', }, },