Skip to content

Latest commit

Β 

History

History
558 lines (540 loc) Β· 54.3 KB

generated-rules.md

File metadata and controls

558 lines (540 loc) Β· 54.3 KB

Rules

The progress of all rule implementations is tracked here.

  • Total number of rules: 502
  • Rules turned on by default: 123

Legend for 'Fixable?' column:

  • πŸ› οΈ: an auto-fix is available for this rule
  • πŸ’‘: a suggestion is available for this rule
  • βš οΈπŸ› οΈ: a dangerous auto-fix is available for this rule
  • βš οΈπŸ’‘: a dangerous suggestion is available for this rule
  • 🚧: an auto-fix or suggestion is possible, but currently not implemented

Correctness (174):

Code that is outright wrong or useless.

Rule name Source Default Fixable?
for-direction eslint βœ… βš οΈπŸ› οΈοΈ
no-async-promise-executor eslint βœ…
no-caller eslint βœ…
no-class-assign eslint βœ…
no-compare-neg-zero eslint βœ… πŸ› οΈπŸ’‘
no-cond-assign eslint βœ…
no-const-assign eslint βœ…
no-constant-binary-expression eslint βœ…
no-constant-condition eslint βœ…
no-control-regex eslint βœ…
no-debugger eslint βœ… πŸ› οΈ
no-delete-var eslint βœ…
no-dupe-class-members eslint βœ…
no-dupe-else-if eslint βœ…
no-dupe-keys eslint βœ…
no-duplicate-case eslint βœ…
no-empty-character-class eslint βœ…
no-empty-pattern eslint βœ…
no-empty-static-block eslint βœ… πŸ’‘
no-eval eslint βœ…
no-ex-assign eslint βœ…
no-extra-boolean-cast eslint βœ… 🚧
no-func-assign eslint βœ…
no-global-assign eslint βœ…
no-import-assign eslint βœ…
no-invalid-regexp eslint βœ…
no-irregular-whitespace eslint βœ…
no-loss-of-precision eslint βœ…
no-new-native-nonconstructor eslint βœ…
no-nonoctal-decimal-escape eslint βœ… 🚧
no-obj-calls eslint βœ…
no-self-assign eslint βœ…
no-setter-return eslint βœ…
no-shadow-restricted-names eslint βœ…
no-sparse-arrays eslint βœ…
no-this-before-super eslint βœ…
no-unsafe-finally eslint βœ…
no-unsafe-negation eslint βœ… πŸ› οΈ
no-unsafe-optional-chaining eslint βœ…
no-unused-labels eslint βœ… πŸ› οΈ
no-unused-private-class-members eslint βœ…
no-unused-vars eslint βœ… βš οΈπŸ’‘
no-useless-catch eslint βœ…
no-useless-escape eslint βœ… πŸ› οΈ
no-useless-rename eslint βœ…
no-with eslint βœ…
require-yield eslint βœ…
use-isnan eslint βœ… πŸ› οΈ
valid-typeof eslint βœ… πŸ› οΈ
default import βœ…
namespace import βœ…
expect-expect jest βœ…
no-conditional-expect jest βœ…
no-disabled-tests jest βœ…
no-export jest βœ…
no-focused-tests jest βœ… πŸ› οΈ
no-standalone-expect jest βœ…
require-to-throw-message jest βœ…
valid-describe-callback jest βœ…
valid-expect jest βœ…
valid-title jest βœ… πŸ› οΈ
check-property-names jsdoc βœ…
check-tag-names jsdoc βœ…
implements-on-classes jsdoc βœ…
no-defaults jsdoc βœ…
require-property jsdoc βœ…
require-property-description jsdoc βœ…
require-property-name jsdoc βœ…
require-property-type jsdoc βœ…
require-yields jsdoc βœ…
alt-text jsx_a11y βœ…
anchor-has-content jsx_a11y βœ… πŸ’‘
anchor-is-valid jsx_a11y βœ…
aria-activedescendant-has-tabindex jsx_a11y βœ…
aria-props jsx_a11y βœ… πŸ› οΈ
aria-role jsx_a11y βœ…
aria-unsupported-elements jsx_a11y βœ… πŸ› οΈ
autocomplete-valid jsx_a11y βœ…
click-events-have-key-events jsx_a11y βœ…
heading-has-content jsx_a11y βœ…
html-has-lang jsx_a11y βœ…
iframe-has-title jsx_a11y βœ…
img-redundant-alt jsx_a11y βœ…
label-has-associated-control jsx_a11y βœ…
lang jsx_a11y βœ…
media-has-caption jsx_a11y βœ…
mouse-events-have-key-events jsx_a11y βœ…
no-access-key jsx_a11y βœ… πŸ’‘
no-aria-hidden-on-focusable jsx_a11y βœ… πŸ› οΈ
no-autofocus jsx_a11y βœ… πŸ› οΈ
no-distracting-elements jsx_a11y βœ…
no-noninteractive-tabindex jsx_a11y βœ…
no-redundant-roles jsx_a11y βœ… πŸ› οΈ
prefer-tag-over-role jsx_a11y βœ…
role-has-required-aria-props jsx_a11y βœ…
role-supports-aria-props jsx_a11y βœ…
scope jsx_a11y βœ… πŸ› οΈ
tabindex-no-positive jsx_a11y βœ… 🚧
google-font-display nextjs βœ…
google-font-preconnect nextjs βœ…
inline-script-id nextjs βœ…
next-script-for-ga nextjs βœ…
no-assign-module-variable nextjs βœ…
no-async-client-component nextjs βœ…
no-before-interactive-script-outside-document nextjs βœ…
no-css-tags nextjs βœ…
no-document-import-in-page nextjs βœ…
no-duplicate-head nextjs βœ…
no-head-element nextjs βœ…
no-head-import-in-document nextjs βœ…
no-img-element nextjs βœ…
no-page-custom-font nextjs βœ…
no-script-component-in-head nextjs βœ…
no-styled-jsx-in-document nextjs βœ…
no-sync-scripts nextjs βœ…
no-title-in-document-head nextjs βœ…
no-typos nextjs βœ… 🚧
no-unwanted-polyfillio nextjs βœ…
bad-array-method-on-arguments oxc βœ…
bad-char-at-comparison oxc βœ…
bad-comparison-sequence oxc βœ…
bad-min-max-func oxc βœ…
bad-object-literal-comparison oxc βœ…
bad-replace-all-arg oxc βœ…
const-comparisons oxc βœ…
double-comparisons oxc βœ… πŸ› οΈ
erasing-op oxc βœ… πŸ’‘
missing-throw oxc βœ… πŸ’‘
number-arg-out-of-range oxc βœ…
only-used-in-recursion oxc βœ… βš οΈπŸ› οΈοΈ
uninvoked-array-callback oxc βœ…
no-callback-in-promise promise βœ…
no-new-statics promise βœ… πŸ› οΈ
valid-params promise βœ…
jsx-key react βœ…
jsx-no-duplicate-props react βœ…
jsx-no-target-blank react βœ…
jsx-no-undef react βœ…
jsx-props-no-spread-multi react βœ… πŸ› οΈ
no-children-prop react βœ…
no-danger-with-children react βœ…
no-direct-mutation-state react βœ…
no-find-dom-node react βœ…
no-is-mounted react βœ…
no-render-return-value react βœ…
no-string-refs react βœ…
void-dom-elements-no-children react βœ…
no-duplicate-enum-values typescript βœ…
no-extra-non-null-assertion typescript βœ…
no-misused-new typescript βœ…
no-non-null-asserted-optional-chain typescript βœ… 🚧
no-this-alias typescript βœ…
no-unnecessary-parameter-property-assignment typescript βœ… 🚧
no-unsafe-declaration-merging typescript βœ…
no-useless-empty-export typescript βœ… πŸ› οΈ
no-wrapper-object-types typescript βœ… πŸ› οΈ
prefer-as-const typescript βœ… πŸ› οΈ
triple-slash-reference typescript βœ…
no-await-in-promise-methods unicorn βœ…
no-document-cookie unicorn βœ…
no-empty-file unicorn βœ…
no-invalid-fetch-options unicorn βœ…
no-invalid-remove-event-listener unicorn βœ…
no-new-array unicorn βœ… 🚧
no-single-promise-in-promise-methods unicorn βœ… πŸ› οΈ
no-thenable unicorn βœ…
no-unnecessary-await unicorn βœ… πŸ› οΈ
no-useless-fallback-in-spread unicorn βœ… πŸ› οΈ
no-useless-length-check unicorn βœ… 🚧
no-useless-spread unicorn βœ… βš οΈπŸ› οΈοΈ
prefer-set-size unicorn βœ… πŸ› οΈ
prefer-string-starts-ends-with unicorn βœ… πŸ› οΈ
no-conditional-tests vitest βœ…
require-local-test-context-for-concurrent-snapshots vitest βœ… 🚧

Perf (9):

Code that can be written to run faster.

Rule name Source Default Fixable?
no-await-in-loop eslint
no-useless-call eslint
no-accumulating-spread oxc
no-array-index-key react
jsx-no-jsx-as-prop react_perf
jsx-no-new-array-as-prop react_perf
jsx-no-new-function-as-prop react_perf
jsx-no-new-object-as-prop react_perf
prefer-set-has unicorn βš οΈπŸ› οΈοΈ

Restriction (64):

Lints which prevent the use of language and library features. Must not be enabled as a whole, should be considered on a case-by-case basis before enabling.

Rule name Source Default Fixable?
default-case eslint
no-alert eslint
no-bitwise eslint
no-console eslint πŸ’‘
no-div-regex eslint πŸ› οΈ
no-empty eslint πŸ’‘
no-empty-function eslint
no-eq-null eslint βš οΈπŸ› οΈοΈ
no-iterator eslint πŸ’‘
no-plusplus eslint πŸ’‘
no-proto eslint 🚧
no-regex-spaces eslint 🚧
no-restricted-globals eslint
no-restricted-imports eslint
no-undefined eslint
no-unused-expressions eslint
no-var eslint πŸ› οΈ
no-void eslint 🚧
unicode-bom eslint πŸ› οΈ
no-amd import
no-commonjs import
no-cycle import
no-default-export import
no-dynamic-require import
no-webpack-loader-syntax import
unambiguous import
check-access jsdoc
empty-tags jsdoc
anchor-ambiguous-text jsx_a11y
no-new-require node
bad-bitwise-operator oxc
no-async-await oxc
no-barrel-file oxc
no-const-enum oxc πŸ› οΈ
no-optional-chaining oxc
no-rest-spread-properties oxc
catch-or-return promise
spec-only promise
button-has-type react
jsx-filename-extension react 🚧
no-danger react
no-unknown-property react 🚧
explicit-function-return-type typescript
no-dynamic-delete typescript
no-empty-object-type typescript
no-explicit-any typescript πŸ› οΈ
no-import-type-side-effects typescript πŸ› οΈ
no-namespace typescript
no-non-null-asserted-nullish-coalescing typescript
no-non-null-assertion typescript
no-require-imports typescript 🚧
no-var-requires typescript
prefer-literal-enum-member typescript
no-abusive-eslint-disable unicorn
no-anonymous-default-export unicorn
no-array-for-each unicorn 🚧
no-array-reduce unicorn
no-length-as-slice-end unicorn πŸ› οΈ
no-magic-array-flat-depth unicorn
no-nested-ternary unicorn πŸ› οΈ
no-process-exit unicorn 🚧
prefer-modern-math-apis unicorn 🚧
prefer-node-protocol unicorn πŸ› οΈ
prefer-number-properties unicorn 🚧

Suspicious (29):

code that is most likely wrong or useless.

Rule name Source Default Fixable?
no-extend-native eslint
no-new eslint
no-unexpected-multiline eslint βš οΈπŸ› οΈοΈ
no-unneeded-ternary eslint 🚧
no-useless-concat eslint
no-useless-constructor eslint πŸ› οΈ
no-absolute-path import 🚧
no-duplicates import
no-empty-named-blocks import πŸ› οΈ
no-named-as-default import
no-named-as-default-member import
no-self-import import
no-commented-out-tests jest
approx-constant oxc
misrefactored-assign-op oxc 🚧
no-async-endpoint-handlers oxc
no-promise-in-callback promise
iframe-missing-sandbox react 🚧
jsx-no-comment-textnodes react
jsx-no-script-url react 🚧
no-namespace react
react-in-jsx-scope react
style-prop-object react
no-confusing-non-null-assertion typescript 🚧
no-extraneous-class typescript
no-unnecessary-type-constraint typescript
consistent-function-scoping unicorn 🚧
prefer-add-event-listener unicorn 🚧
require-post-message-target-origin unicorn πŸ› οΈ

Pedantic (79):

Lints which are rather strict or have occasional false positives.

Rule name Source Default Fixable?
array-callback-return eslint
eqeqeq eslint πŸ› οΈ
max-classes-per-file eslint
max-depth eslint
max-lines eslint
max-lines-per-function eslint
max-nested-callbacks eslint
no-array-constructor eslint 🚧
no-case-declarations eslint
no-constructor-return eslint
no-else-return eslint πŸ› οΈ
no-fallthrough eslint 🚧
no-inner-declarations eslint
no-lonely-if eslint 🚧
no-negated-condition eslint 🚧
no-new-wrappers eslint 🚧
no-object-constructor eslint 🚧
no-prototype-builtins eslint
no-redeclare eslint
no-self-compare eslint
no-throw-literal eslint πŸ’‘
radix eslint
require-await eslint
sort-vars eslint 🚧
symbol-description eslint
max-dependencies import
no-conditional-in-test jest
require-param jsdoc
require-param-description jsdoc
require-param-name jsdoc
require-param-type jsdoc
require-returns jsdoc
require-returns-description jsdoc
require-returns-type jsdoc
checked-requires-onchange-or-readonly react
jsx-no-useless-fragment react
no-unescaped-entities react
rules-of-hooks react
ban-ts-comment typescript πŸ› οΈ
ban-types typescript 🚧
no-unsafe-function-type typescript
prefer-enum-initializers typescript 🚧
prefer-ts-expect-error typescript πŸ› οΈ
consistent-empty-array-spread unicorn πŸ’‘
escape-case unicorn πŸ› οΈ
explicit-length-check unicorn πŸ› οΈ
new-for-builtins unicorn
no-hex-escape unicorn πŸ› οΈ
no-instanceof-array unicorn πŸ› οΈ
no-lonely-if unicorn
no-negation-in-equality-check unicorn 🚧
no-new-buffer unicorn 🚧
no-object-as-default-parameter unicorn
no-static-only-class unicorn 🚧
no-this-assignment unicorn
no-typeof-undefined unicorn 🚧
no-unreadable-iife unicorn
no-useless-promise-resolve-reject unicorn πŸ› οΈ
no-useless-switch-case unicorn 🚧
no-useless-undefined unicorn πŸ› οΈ
prefer-array-flat unicorn πŸ› οΈ
prefer-array-some unicorn πŸ› οΈ
prefer-blob-reading-methods unicorn 🚧
prefer-code-point unicorn πŸ› οΈ
prefer-date-now unicorn πŸ› οΈ
prefer-dom-node-append unicorn πŸ› οΈ
prefer-dom-node-dataset unicorn 🚧
prefer-dom-node-remove unicorn
prefer-event-target unicorn
prefer-math-min-max unicorn πŸ› οΈ
prefer-math-trunc unicorn 🚧
prefer-native-coercion-functions unicorn 🚧
prefer-prototype-methods unicorn πŸ› οΈ
prefer-query-selector unicorn πŸ› οΈ
prefer-regexp-test unicorn πŸ› οΈ
prefer-string-replace-all unicorn πŸ› οΈ
prefer-string-slice unicorn πŸ› οΈ
prefer-type-error unicorn πŸ› οΈ
require-number-to-fixed-digits-argument unicorn πŸ› οΈ

Style (137):

Code that should be written in a more idiomatic way.

Rule name Source Default Fixable?
curly eslint πŸ› οΈ
default-case-last eslint
default-param-last eslint
func-names eslint πŸ› οΈπŸ’‘
func-style eslint 🚧
grouped-accessor-pairs eslint 🚧
guard-for-in eslint
init-declarations eslint
max-params eslint
new-cap eslint 🚧
no-continue eslint
no-duplicate-imports eslint 🚧
no-extra-label eslint πŸ› οΈ
no-label-var eslint
no-labels eslint
no-lone-blocks eslint
no-magic-numbers eslint 🚧
no-multi-assign eslint
no-multi-str eslint
no-nested-ternary eslint
no-new-func eslint
no-return-assign eslint 🚧
no-script-url eslint
no-template-curly-in-string eslint βš οΈπŸ› οΈοΈ
no-ternary eslint
operator-assignment eslint βš οΈπŸ› οΈοΈ
prefer-exponentiation-operator eslint
prefer-numeric-literals eslint πŸ› οΈ
prefer-object-has-own eslint πŸ› οΈ
prefer-object-spread eslint πŸ› οΈ
prefer-promise-reject-errors eslint
prefer-rest-params eslint
prefer-spread eslint
sort-imports eslint πŸ› οΈ
sort-keys eslint 🚧
vars-on-top eslint
yoda eslint πŸ› οΈ
exports-last import
first import 🚧
no-anonymous-default-export import
no-mutable-exports import
no-named-default import
no-namespace import 🚧
consistent-test-it jest πŸ› οΈ
max-expects jest
max-nested-describe jest
no-alias-methods jest πŸ› οΈ
no-confusing-set-timeout jest
no-deprecated-functions jest πŸ› οΈ
no-done-callback jest
no-duplicate-hooks jest
no-hooks jest
no-identical-title jest
no-interpolation-in-snapshots jest
no-jasmine-globals jest πŸ› οΈ
no-large-snapshots jest
no-mocks-import jest
no-restricted-jest-methods jest
no-restricted-matchers jest
no-test-prefixes jest πŸ› οΈ
no-test-return-statement jest
no-untyped-mock-factory jest πŸ› οΈ
prefer-called-with jest
prefer-comparison-matcher jest πŸ› οΈ
prefer-each jest
prefer-equality-matcher jest
prefer-expect-resolves jest πŸ› οΈ
prefer-hooks-in-order jest
prefer-hooks-on-top jest
prefer-jest-mocked jest πŸ› οΈ
prefer-lowercase-title jest πŸ› οΈ
prefer-mock-promise-shorthand jest πŸ› οΈ
prefer-spy-on jest πŸ› οΈ
prefer-strict-equal jest πŸ› οΈ
prefer-to-be jest πŸ› οΈ
prefer-to-contain jest
prefer-to-have-length jest πŸ› οΈ
prefer-todo jest πŸ› οΈ
require-hook jest
require-top-level-describe jest
no-exports-assign node πŸ› οΈ
avoid-new promise
no-nesting promise 🚧
no-return-wrap promise 🚧
param-names promise
prefer-await-to-callbacks promise
prefer-await-to-then promise
prefer-catch promise 🚧
jsx-boolean-value react πŸ› οΈ
jsx-curly-brace-presence react
no-set-state react
prefer-es6-class react
self-closing-comp react 🚧
adjacent-overload-signatures typescript
array-type typescript πŸ› οΈ
ban-tslint-comment typescript πŸ› οΈ
consistent-generic-constructors typescript 🚧
consistent-indexed-object-style typescript πŸ› οΈ
consistent-type-definitions typescript πŸ› οΈ
no-empty-interface typescript
no-inferrable-types typescript 🚧
prefer-for-of typescript 🚧
prefer-function-type typescript πŸ› οΈ
prefer-namespace-keyword typescript πŸ› οΈ
catch-error-name unicorn πŸ› οΈ
consistent-date-clone unicorn πŸ› οΈ
consistent-existence-index-check unicorn πŸ› οΈ
empty-brace-spaces unicorn πŸ› οΈ
error-message unicorn
filename-case unicorn
no-await-expression-member unicorn 🚧
no-console-spaces unicorn πŸ› οΈ
no-null unicorn πŸ› οΈ
no-unreadable-array-destructuring unicorn
no-zero-fractions unicorn πŸ› οΈ
number-literal-case unicorn πŸ› οΈ
numeric-separators-style unicorn πŸ› οΈ
prefer-array-flat-map unicorn πŸ› οΈ
prefer-dom-node-text-content unicorn πŸ› οΈ
prefer-includes unicorn 🚧
prefer-logical-operator-over-ternary unicorn 🚧
prefer-modern-dom-apis unicorn 🚧
prefer-negative-index unicorn πŸ› οΈ
prefer-optional-catch-binding unicorn πŸ› οΈ
prefer-reflect-apply unicorn
prefer-spread unicorn πŸ› οΈ
prefer-string-raw unicorn πŸ› οΈ
prefer-string-trim-start-end unicorn πŸ› οΈ
prefer-structured-clone unicorn 🚧
require-array-join-separator unicorn πŸ› οΈ
switch-case-braces unicorn πŸ› οΈ
text-encoding-identifier-case unicorn πŸ› οΈ
throw-new-error unicorn πŸ› οΈ
no-import-node-test vitest πŸ› οΈ
prefer-to-be-falsy vitest πŸ› οΈ
prefer-to-be-object vitest πŸ› οΈ
prefer-to-be-truthy vitest πŸ› οΈ

Nursery (10):

New lints that are still under development.

Rule name Source Default Fixable?
getter-return eslint
no-undef eslint
no-unreachable eslint
export import
named import
no-map-spread oxc πŸ› οΈπŸ’‘
no-return-in-finally promise
exhaustive-deps react
require-render-return react
consistent-type-imports typescript πŸ› οΈ