Skip to content

Rules ​

The progress of all rule implementations is tracked here.

  • Total number of rules: 524
  • 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 (176): ​

Code that is outright wrong or useless.

Rule nameSourceDefaultFixable?
for-directioneslintβœ…βš οΈπŸ› οΈοΈ
no-async-promise-executoreslintβœ…
no-callereslintβœ…
no-class-assigneslintβœ…
no-compare-neg-zeroeslintβœ…πŸ› οΈπŸ’‘
no-cond-assigneslintβœ…
no-const-assigneslintβœ…
no-constant-binary-expressioneslintβœ…
no-constant-conditioneslintβœ…
no-control-regexeslintβœ…
no-debuggereslintβœ…πŸ› οΈ
no-delete-vareslintβœ…
no-dupe-class-memberseslintβœ…
no-dupe-else-ifeslintβœ…
no-dupe-keyseslintβœ…
no-duplicate-caseeslintβœ…
no-empty-character-classeslintβœ…
no-empty-patterneslintβœ…
no-empty-static-blockeslintβœ…πŸ’‘
no-evaleslintβœ…
no-ex-assigneslintβœ…
no-extra-boolean-casteslintβœ…πŸ› οΈπŸ’‘
no-func-assigneslintβœ…
no-global-assigneslintβœ…
no-import-assigneslintβœ…
no-invalid-regexpeslintβœ…
no-irregular-whitespaceeslintβœ…
no-loss-of-precisioneslintβœ…
no-new-native-nonconstructoreslintβœ…
no-nonoctal-decimal-escapeeslintβœ…πŸš§
no-obj-callseslintβœ…
no-self-assigneslintβœ…
no-setter-returneslintβœ…
no-shadow-restricted-nameseslintβœ…
no-sparse-arrayseslintβœ…
no-this-before-supereslintβœ…
no-unsafe-finallyeslintβœ…
no-unsafe-negationeslintβœ…πŸ› οΈ
no-unsafe-optional-chainingeslintβœ…
no-unused-labelseslintβœ…πŸ› οΈ
no-unused-private-class-memberseslintβœ…
no-unused-varseslintβœ…βš οΈπŸ’‘
no-useless-backreferenceeslintβœ…
no-useless-catcheslintβœ…
no-useless-escapeeslintβœ…πŸ› οΈ
no-useless-renameeslintβœ…
no-witheslintβœ…
require-yieldeslintβœ…
use-isnaneslintβœ…πŸ› οΈ
valid-typeofeslintβœ…πŸ› οΈ
defaultimportβœ…
namespaceimportβœ…
expect-expectjestβœ…
no-conditional-expectjestβœ…
no-disabled-testsjestβœ…
no-exportjestβœ…
no-focused-testsjestβœ…πŸ› οΈ
no-standalone-expectjestβœ…
require-to-throw-messagejestβœ…
valid-describe-callbackjestβœ…
valid-expectjestβœ…
valid-titlejestβœ…πŸ› οΈ
check-property-namesjsdocβœ…
check-tag-namesjsdocβœ…
implements-on-classesjsdocβœ…
no-defaultsjsdocβœ…
require-propertyjsdocβœ…
require-property-descriptionjsdocβœ…
require-property-namejsdocβœ…
require-property-typejsdocβœ…
require-yieldsjsdocβœ…
alt-textjsx_a11yβœ…
anchor-has-contentjsx_a11yβœ…πŸ’‘
anchor-is-validjsx_a11yβœ…
aria-activedescendant-has-tabindexjsx_a11yβœ…
aria-propsjsx_a11yβœ…πŸ› οΈ
aria-rolejsx_a11yβœ…
aria-unsupported-elementsjsx_a11yβœ…πŸ› οΈ
autocomplete-validjsx_a11yβœ…
click-events-have-key-eventsjsx_a11yβœ…
heading-has-contentjsx_a11yβœ…
html-has-langjsx_a11yβœ…
iframe-has-titlejsx_a11yβœ…
img-redundant-altjsx_a11yβœ…
label-has-associated-controljsx_a11yβœ…
langjsx_a11yβœ…
media-has-captionjsx_a11yβœ…
mouse-events-have-key-eventsjsx_a11yβœ…
no-access-keyjsx_a11yβœ…πŸ’‘
no-aria-hidden-on-focusablejsx_a11yβœ…πŸ› οΈ
no-autofocusjsx_a11yβœ…πŸ› οΈ
no-distracting-elementsjsx_a11yβœ…
no-noninteractive-tabindexjsx_a11yβœ…
no-redundant-rolesjsx_a11yβœ…πŸ› οΈ
prefer-tag-over-rolejsx_a11yβœ…
role-has-required-aria-propsjsx_a11yβœ…
role-supports-aria-propsjsx_a11yβœ…
scopejsx_a11yβœ…πŸ› οΈ
tabindex-no-positivejsx_a11yβœ…πŸš§
google-font-displaynextjsβœ…
google-font-preconnectnextjsβœ…
inline-script-idnextjsβœ…
next-script-for-ganextjsβœ…
no-assign-module-variablenextjsβœ…
no-async-client-componentnextjsβœ…
no-before-interactive-script-outside-documentnextjsβœ…
no-css-tagsnextjsβœ…
no-document-import-in-pagenextjsβœ…
no-duplicate-headnextjsβœ…
no-head-elementnextjsβœ…
no-head-import-in-documentnextjsβœ…
no-img-elementnextjsβœ…πŸš§
no-page-custom-fontnextjsβœ…
no-script-component-in-headnextjsβœ…
no-styled-jsx-in-documentnextjsβœ…
no-sync-scriptsnextjsβœ…
no-title-in-document-headnextjsβœ…
no-typosnextjsβœ…πŸš§
no-unwanted-polyfillionextjsβœ…
bad-array-method-on-argumentsoxcβœ…
bad-char-at-comparisonoxcβœ…
bad-comparison-sequenceoxcβœ…
bad-min-max-funcoxcβœ…
bad-object-literal-comparisonoxcβœ…
bad-replace-all-argoxcβœ…
const-comparisonsoxcβœ…
double-comparisonsoxcβœ…πŸ› οΈ
erasing-opoxcβœ…βš οΈπŸ› οΈοΈ
missing-throwoxcβœ…πŸ’‘
number-arg-out-of-rangeoxcβœ…
only-used-in-recursionoxcβœ…βš οΈπŸ› οΈοΈ
uninvoked-array-callbackoxcβœ…
no-callback-in-promisepromiseβœ…
no-new-staticspromiseβœ…πŸ› οΈ
valid-paramspromiseβœ…
exhaustive-depsreactβœ…
forward-ref-uses-refreactβœ…πŸ’‘
jsx-keyreactβœ…
jsx-no-duplicate-propsreactβœ…
jsx-no-target-blankreactβœ…
jsx-no-undefreactβœ…
jsx-props-no-spread-multireactβœ…πŸ› οΈ
no-children-propreactβœ…
no-danger-with-childrenreactβœ…
no-direct-mutation-statereactβœ…
no-find-dom-nodereactβœ…
no-is-mountedreactβœ…
no-render-return-valuereactβœ…
no-string-refsreactβœ…
void-dom-elements-no-childrenreactβœ…
no-duplicate-enum-valuestypescriptβœ…
no-extra-non-null-assertiontypescriptβœ…
no-misused-newtypescriptβœ…
no-non-null-asserted-optional-chaintypescriptβœ…πŸ› οΈ
no-this-aliastypescriptβœ…
no-unnecessary-parameter-property-assignmenttypescriptβœ…πŸ’‘
no-unsafe-declaration-mergingtypescriptβœ…
no-useless-empty-exporttypescriptβœ…πŸ› οΈ
no-wrapper-object-typestypescriptβœ…πŸ› οΈ
prefer-as-consttypescriptβœ…πŸ› οΈ
triple-slash-referencetypescriptβœ…
no-await-in-promise-methodsunicornβœ…
no-empty-fileunicornβœ…
no-invalid-fetch-optionsunicornβœ…
no-invalid-remove-event-listenerunicornβœ…
no-new-arrayunicornβœ…πŸš§
no-single-promise-in-promise-methodsunicornβœ…πŸ› οΈ
no-thenableunicornβœ…
no-unnecessary-awaitunicornβœ…πŸ› οΈ
no-useless-fallback-in-spreadunicornβœ…πŸ› οΈ
no-useless-length-checkunicornβœ…πŸš§
no-useless-spreadunicornβœ…βš οΈπŸ› οΈοΈ
prefer-set-sizeunicornβœ…πŸ› οΈ
prefer-string-starts-ends-withunicornβœ…πŸ› οΈ
no-conditional-testsvitestβœ…
require-local-test-context-for-concurrent-snapshotsvitestβœ…πŸš§

Perf (10): ​

Code that can be written to run faster.

Rule nameSourceDefaultFixable?
no-await-in-loopeslint
no-useless-calleslint
no-accumulating-spreadoxc
no-array-index-keyreact
jsx-no-jsx-as-propreact_perf
jsx-no-new-array-as-propreact_perf
jsx-no-new-function-as-propreact_perf
jsx-no-new-object-as-propreact_perf
prefer-array-findunicorn🚧
prefer-set-hasunicornβš οΈπŸ› οΈοΈ

Restriction (66): ​

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 nameSourceDefaultFixable?
default-caseeslint
no-alerteslint
no-bitwiseeslint
no-consoleeslintπŸ’‘
no-div-regexeslintπŸ› οΈ
no-emptyeslintπŸ’‘
no-empty-functioneslint
no-eq-nulleslintβš οΈπŸ› οΈοΈ
no-iteratoreslintπŸ’‘
no-pluspluseslintπŸ’‘
no-protoeslint🚧
no-regex-spaceseslint🚧
no-restricted-globalseslint
no-restricted-importseslint
no-undefinedeslint
no-unused-expressionseslint
no-vareslintπŸ› οΈ
no-voideslintπŸ’‘
unicode-bomeslintπŸ› οΈ
extensionsimport
no-amdimport
no-commonjsimport
no-cycleimport
no-default-exportimport
no-dynamic-requireimport
no-webpack-loader-syntaximport
unambiguousimport
check-accessjsdoc
empty-tagsjsdoc
anchor-ambiguous-textjsx_a11y
no-new-requirenode
bad-bitwise-operatoroxc
no-async-awaitoxc
no-barrel-fileoxc
no-const-enumoxcπŸ› οΈ
no-optional-chainingoxc
no-rest-spread-propertiesoxc
catch-or-returnpromise
spec-onlypromise
button-has-typereact
forbid-elementsreact
jsx-filename-extensionreact🚧
no-dangerreact
no-unknown-propertyreact🚧
explicit-function-return-typetypescript
no-dynamic-deletetypescript
no-empty-object-typetypescript
no-explicit-anytypescriptπŸ› οΈ
no-import-type-side-effectstypescriptπŸ› οΈ
no-namespacetypescript
no-non-null-asserted-nullish-coalescingtypescript
no-non-null-assertiontypescript
no-require-importstypescript🚧
no-var-requirestypescript
prefer-literal-enum-membertypescript
no-abusive-eslint-disableunicorn
no-anonymous-default-exportunicorn
no-array-for-eachunicorn🚧
no-array-reduceunicorn
no-document-cookieunicorn
no-length-as-slice-endunicornπŸ› οΈ
no-magic-array-flat-depthunicorn
no-process-exitunicorn🚧
prefer-modern-math-apisunicorn🚧
prefer-node-protocolunicornπŸ› οΈ
prefer-number-propertiesunicornβš οΈπŸ› οΈοΈ

Suspicious (33): ​

code that is most likely wrong or useless.

Rule nameSourceDefaultFixable?
block-scoped-vareslint
no-extend-nativeeslint
no-extra-bindeslint🚧
no-neweslint
no-unexpected-multilineeslintβš οΈπŸ› οΈοΈ
no-unneeded-ternaryeslintβš οΈπŸ› οΈοΈ
no-useless-concateslint
no-useless-constructoreslintπŸ› οΈ
no-absolute-pathimport🚧
no-empty-named-blocksimportπŸ› οΈ
no-named-as-defaultimport
no-named-as-default-memberimport
no-self-importimport
no-unassigned-importimport
no-commented-out-testsjest
approx-constantoxc
misrefactored-assign-opoxc🚧
no-async-endpoint-handlersoxc
no-promise-in-callbackpromise
iframe-missing-sandboxreact🚧
jsx-no-comment-textnodesreact
jsx-no-script-urlreact🚧
no-namespacereact
react-in-jsx-scopereact
style-prop-objectreact
no-confusing-non-null-assertiontypescript🚧
no-extraneous-classtypescriptβš οΈπŸ’‘
no-unnecessary-type-constrainttypescript
consistent-function-scopingunicorn🚧
no-accessor-recursionunicorn
no-instanceof-builtinsunicorn🚧
prefer-add-event-listenerunicorn🚧
require-post-message-target-originunicornπŸ’‘

Pedantic (82): ​

Lints which are rather strict or have occasional false positives.

Rule nameSourceDefaultFixable?
array-callback-returneslint
eqeqeqeslintβš οΈπŸ› οΈοΈ
max-classes-per-fileeslint
max-deptheslint
max-lineseslint
max-lines-per-functioneslint
max-nested-callbackseslint
no-array-constructoreslintπŸ› οΈ
no-case-declarationseslint
no-constructor-returneslint
no-else-returneslintπŸ› οΈ
no-fallthrougheslint🚧
no-inner-declarationseslint
no-lonely-ifeslint🚧
no-negated-conditioneslint🚧
no-new-wrapperseslintπŸ› οΈ
no-object-constructoreslint🚧
no-prototype-builtinseslint
no-redeclareeslint
no-self-compareeslint
no-throw-literaleslintπŸ’‘
radixeslintβš οΈπŸ› οΈοΈ
require-awaiteslintβš οΈπŸ› οΈοΈ
sort-varseslint🚧
symbol-descriptioneslint
max-dependenciesimport
no-conditional-in-testjest
require-paramjsdoc
require-param-descriptionjsdoc
require-param-namejsdoc
require-param-typejsdoc
require-returnsjsdoc
require-returns-descriptionjsdoc
require-returns-typejsdoc
checked-requires-onchange-or-readonlyreact
jsx-no-useless-fragmentreactπŸ’‘
no-unescaped-entitiesreact
rules-of-hooksreact
ban-ts-commenttypescriptπŸ› οΈ
ban-typestypescript🚧
no-unsafe-function-typetypescript
prefer-enum-initializerstypescript🚧
prefer-ts-expect-errortypescriptπŸ› οΈ
consistent-assertunicornπŸ› οΈ
consistent-empty-array-spreadunicornπŸ’‘
escape-caseunicornπŸ› οΈ
explicit-length-checkunicornπŸ› οΈ
new-for-builtinsunicorn
no-hex-escapeunicornπŸ› οΈ
no-instanceof-arrayunicornπŸ› οΈ
no-lonely-ifunicorn
no-negation-in-equality-checkunicorn🚧
no-new-bufferunicorn🚧
no-object-as-default-parameterunicorn
no-static-only-classunicornβš οΈπŸ› οΈοΈ
no-this-assignmentunicorn
no-typeof-undefinedunicorn🚧
no-unnecessary-array-flat-depthunicorn🚧
no-unnecessary-slice-endunicornπŸ› οΈ
no-unreadable-iifeunicorn
no-useless-promise-resolve-rejectunicornπŸ› οΈ
no-useless-switch-caseunicorn🚧
no-useless-undefinedunicornπŸ› οΈ
prefer-array-flatunicornβš οΈπŸ› οΈοΈ
prefer-array-someunicornπŸ› οΈ
prefer-blob-reading-methodsunicorn🚧
prefer-code-pointunicornπŸ› οΈ
prefer-date-nowunicornπŸ› οΈ
prefer-dom-node-appendunicornπŸ› οΈ
prefer-dom-node-datasetunicorn🚧
prefer-dom-node-removeunicorn
prefer-event-targetunicorn
prefer-math-min-maxunicornπŸ› οΈ
prefer-math-truncunicorn🚧
prefer-native-coercion-functionsunicorn🚧
prefer-prototype-methodsunicornπŸ› οΈ
prefer-query-selectorunicornπŸ› οΈ
prefer-regexp-testunicornπŸ› οΈ
prefer-string-replace-allunicornπŸ› οΈ
prefer-string-sliceunicornπŸ› οΈ
prefer-type-errorunicornπŸ› οΈ
require-number-to-fixed-digits-argumentunicornπŸ› οΈ

Style (149): ​

Code that should be written in a more idiomatic way.

Rule nameSourceDefaultFixable?
arrow-body-styleeslint🚧
curlyeslintπŸ› οΈ
default-case-lasteslint
default-param-lasteslint
func-nameseslintπŸ› οΈπŸ’‘
func-styleeslint🚧
grouped-accessor-pairseslint🚧
guard-for-ineslint
id-lengtheslint
init-declarationseslint
max-paramseslint
new-capeslint🚧
no-continueeslint
no-duplicate-importseslint🚧
no-extra-labeleslintπŸ› οΈ
no-label-vareslint
no-labelseslint
no-lone-blockseslint
no-magic-numberseslint🚧
no-multi-assigneslint
no-multi-streslint
no-nested-ternaryeslint
no-new-funceslint
no-return-assigneslint🚧
no-script-urleslint
no-template-curly-in-stringeslintβš οΈπŸ› οΈοΈ
no-ternaryeslint
operator-assignmenteslintβš οΈπŸ› οΈοΈ
prefer-exponentiation-operatoreslint
prefer-numeric-literalseslintπŸ› οΈ
prefer-object-has-owneslintπŸ› οΈ
prefer-object-spreadeslintπŸ› οΈ
prefer-promise-reject-errorseslint
prefer-rest-paramseslint
prefer-spreadeslint
sort-importseslintπŸ› οΈ
sort-keyseslint🚧
vars-on-topeslint
yodaeslintπŸ› οΈ
consistent-type-specifier-styleimportπŸ› οΈ
exports-lastimport
firstimport🚧
group-exportsimport
no-anonymous-default-exportimport
no-duplicatesimport
no-mutable-exportsimport
no-named-defaultimport
no-namespaceimport🚧
prefer-default-exportimport
consistent-test-itjestπŸ› οΈ
max-expectsjest
max-nested-describejest
no-alias-methodsjestπŸ› οΈ
no-confusing-set-timeoutjest
no-deprecated-functionsjestπŸ› οΈ
no-done-callbackjest
no-duplicate-hooksjest
no-hooksjest
no-identical-titlejest
no-interpolation-in-snapshotsjest
no-jasmine-globalsjestπŸ› οΈ
no-large-snapshotsjest
no-mocks-importjest
no-restricted-jest-methodsjest
no-restricted-matchersjest
no-test-prefixesjestπŸ› οΈ
no-test-return-statementjest
no-untyped-mock-factoryjestπŸ› οΈ
prefer-called-withjest
prefer-comparison-matcherjestπŸ› οΈ
prefer-eachjest
prefer-equality-matcherjest
prefer-expect-resolvesjestπŸ› οΈ
prefer-hooks-in-orderjest
prefer-hooks-on-topjest
prefer-jest-mockedjestπŸ› οΈ
prefer-lowercase-titlejestπŸ› οΈ
prefer-mock-promise-shorthandjestπŸ› οΈ
prefer-spy-onjestπŸ› οΈ
prefer-strict-equaljestπŸ› οΈ
prefer-to-bejestπŸ› οΈ
prefer-to-containjest
prefer-to-have-lengthjestπŸ› οΈ
prefer-todojestπŸ› οΈ
require-hookjest
require-top-level-describejest
no-exports-assignnodeπŸ› οΈ
avoid-newpromise
no-nestingpromise🚧
no-return-wrappromise🚧
param-namespromise
prefer-await-to-callbackspromise
prefer-await-to-thenpromise
prefer-catchpromise🚧
jsx-boolean-valuereactπŸ› οΈ
jsx-curly-brace-presencereact🚧
no-set-statereact
prefer-es6-classreact
self-closing-compreactπŸ› οΈ
adjacent-overload-signaturestypescript
array-typetypescriptπŸ› οΈ
ban-tslint-commenttypescriptπŸ› οΈ
consistent-generic-constructorstypescript🚧
consistent-indexed-object-styletypescriptπŸ› οΈ
consistent-type-definitionstypescriptπŸ› οΈ
consistent-type-importstypescriptπŸ› οΈ
no-empty-interfacetypescript
no-inferrable-typestypescript🚧
prefer-for-oftypescript🚧
prefer-function-typetypescriptπŸ› οΈ
prefer-namespace-keywordtypescriptπŸ› οΈ
catch-error-nameunicornπŸ› οΈ
consistent-date-cloneunicornπŸ› οΈ
consistent-existence-index-checkunicornπŸ› οΈ
empty-brace-spacesunicornπŸ› οΈ
error-messageunicorn
filename-caseunicorn
no-array-method-this-argumentunicorn🚧
no-await-expression-memberunicornβš οΈπŸ› οΈοΈ
no-console-spacesunicornπŸ› οΈ
no-nested-ternaryunicornπŸ› οΈ
no-nullunicornπŸ› οΈ
no-unreadable-array-destructuringunicorn
no-zero-fractionsunicornπŸ› οΈ
number-literal-caseunicornπŸ› οΈ
numeric-separators-styleunicornπŸ› οΈ
prefer-array-flat-mapunicornπŸ› οΈ
prefer-array-index-ofunicorn🚧
prefer-dom-node-text-contentunicornπŸ› οΈ
prefer-global-thisunicorn🚧
prefer-includesunicorn🚧
prefer-logical-operator-over-ternaryunicorn🚧
prefer-modern-dom-apisunicorn🚧
prefer-negative-indexunicornπŸ› οΈ
prefer-object-from-entriesunicorn🚧
prefer-optional-catch-bindingunicornπŸ› οΈ
prefer-reflect-applyunicorn
prefer-spreadunicornπŸ› οΈ
prefer-string-rawunicornπŸ› οΈ
prefer-string-trim-start-endunicornπŸ› οΈ
prefer-structured-cloneunicornπŸ’‘
require-array-join-separatorunicornπŸ› οΈ
switch-case-bracesunicornπŸ› οΈ
text-encoding-identifier-caseunicornπŸ› οΈ
throw-new-errorunicornπŸ› οΈ
no-import-node-testvitestπŸ› οΈ
prefer-to-be-falsyvitestπŸ› οΈ
prefer-to-be-objectvitestπŸ› οΈ
prefer-to-be-truthyvitestπŸ› οΈ

Nursery (8): ​

New lints that are still under development.

Rule nameSourceDefaultFixable?
getter-returneslint
no-undefeslint
no-unreachableeslint
exportimport
namedimport
no-map-spreadoxcπŸ› οΈπŸ’‘
no-return-in-finallypromise
require-render-returnreact

Released under the MIT License.