Skip to content

Rules

The progress of all rule implementations is tracked here.

  • Total number of rules: 376
  • Rules turned on by default: 91

Correctness (159):

Code that is outright wrong or useless.

Rule nameSourceDefault
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-ex-assigneslint
no-extra-boolean-casteslint
no-func-assigneslint
no-global-assigneslint
no-import-assigneslint
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-unused-labelseslint
no-unused-private-class-memberseslint
no-useless-catcheslint
no-useless-escapeeslint
no-useless-renameeslint
no-witheslint
require-yieldeslint
use-isnaneslint
valid-typeofeslint
defaultimport
namedimport
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
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-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
jsx-keyreact
jsx-no-duplicate-propsreact
jsx-no-target-blankreact
jsx-no-undefreact
no-children-propreact
no-direct-mutation-statereact
no-find-dom-nodereact
no-is-mountedreact
no-render-return-valuereact
no-string-refsreact
void-dom-elements-no-childrenreact
no-extra-non-null-assertiontypescript
no-misused-newtypescript
no-namespacetypescript
no-non-null-asserted-optional-chaintypescript
no-this-aliastypescript
no-unsafe-declaration-mergingtypescript
no-useless-empty-exporttypescript
prefer-as-consttypescript
triple-slash-referencetypescript
no-await-in-promise-methodsunicorn
no-document-cookieunicorn
no-empty-fileunicorn
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

Perf (6):

Code that can be written to run faster.

Rule nameSourceDefault
no-await-in-loopeslint
no-accumulating-spreadoxc
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

Restriction (47):

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 nameSourceDefault
default-caseeslint
no-bitwiseeslint
no-consoleeslint
no-div-regexeslint
no-emptyeslint
no-empty-functioneslint
no-eq-nulleslint
no-evaleslint
no-iteratoreslint
no-protoeslint
no-regex-spaceseslint
no-restricted-globalseslint
no-unsafe-optional-chainingeslint
no-vareslint
no-voideslint
unicode-bomeslint
no-amdimport
no-cycleimport
no-default-exportimport
check-accessjsdoc
empty-tagsjsdoc
bad-bitwise-operatoroxc
no-async-awaitoxc
no-barrel-fileoxc
no-const-enumoxc
no-optional-chainingoxc
no-rest-spread-propertiesoxc
button-has-typereact
no-dangerreact
no-unknown-propertyreact
explicit-function-return-typetypescript
no-explicit-anytypescript
no-import-type-side-effectstypescript
no-non-null-asserted-nullish-coalescingtypescript
no-non-null-assertiontypescript
no-var-requirestypescript
prefer-literal-enum-membertypescript
no-abusive-eslint-disableunicorn
no-anonymous-default-exportunicorn
no-array-for-eachunicorn
no-array-reduceunicorn
no-magic-array-flat-depthunicorn
no-nested-ternaryunicorn
no-process-exitunicorn
prefer-modern-math-apisunicorn
prefer-node-protocolunicorn
prefer-number-propertiesunicorn

Suspicious (14):

code that is most likely wrong or useless.

Rule nameSourceDefault
no-neweslint
no-useless-concateslint
no-useless-constructoreslint
no-duplicatesimport
no-named-as-defaultimport
no-named-as-default-memberimport
no-self-importimport
no-commented-out-testsjest
approx-constantoxc
misrefactored-assign-opoxc
jsx-no-comment-textnodesreact
react-in-jsx-scopereact
no-unnecessary-type-constrainttypescript
prefer-add-event-listenerunicorn

Pedantic (65):

Lints which are rather strict or have occasional false positives.

Rule nameSourceDefault
array-callback-returneslint
eqeqeqeslint
max-classes-per-fileeslint
max-lineseslint
no-array-constructoreslint
no-case-declarationseslint
no-constructor-returneslint
no-fallthrougheslint
no-inner-declarationseslint
no-new-wrapperseslint
no-prototype-builtinseslint
no-redeclareeslint
no-self-compareeslint
radixeslint
require-awaiteslint
symbol-descriptioneslint
max-dependenciesimport
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
ban-ts-commenttypescript
ban-typestypescript
no-duplicate-enum-valuestypescript
prefer-enum-initializerstypescript
prefer-ts-expect-errortypescript
escape-caseunicorn
explicit-length-checkunicorn
new-for-builtinsunicorn
no-hex-escapeunicorn
no-instanceof-arrayunicorn
no-lonely-ifunicorn
no-negated-conditionunicorn
no-new-bufferunicorn
no-object-as-default-parameterunicorn
no-static-only-classunicorn
no-this-assignmentunicorn
no-typeof-undefinedunicorn
no-unreadable-iifeunicorn
no-useless-promise-resolve-rejectunicorn
no-useless-switch-caseunicorn
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-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 (77):

Code that should be written in a more idiomatic way.

Rule nameSourceDefault
default-case-lasteslint
default-param-lasteslint
guard-for-ineslint
max-paramseslint
no-continueeslint
no-script-urleslint
no-template-curly-in-stringeslint
no-ternaryeslint
prefer-exponentiation-operatoreslint
sort-importseslint
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-equality-matcherjest
prefer-expect-resolvesjest
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
prefer-es-6-classreact
adjacent-overload-signaturestypescript
array-typetypescript
ban-tslint-commenttypescript
consistent-indexed-object-styletypescript
consistent-type-definitionstypescript
no-empty-interfacetypescript
prefer-for-oftypescript
prefer-function-typetypescript
catch-error-nameunicorn
empty-brace-spacesunicorn
error-messageunicorn
filename-caseunicorn
no-await-expression-memberunicorn
no-console-spacesunicorn
no-nullunicorn
no-unreadable-array-destructuringunicorn
no-zero-fractionsunicorn
number-literal-caseunicorn
numeric-separators-styleunicorn
prefer-array-flat-mapunicorn
prefer-dom-node-text-contentunicorn
prefer-includesunicorn
prefer-logical-operator-over-ternaryunicorn
prefer-modern-dom-apisunicorn
prefer-optional-catch-bindingunicorn
prefer-reflect-applyunicorn
prefer-spreadunicorn
prefer-string-trim-start-endunicorn
require-array-join-separatorunicorn
switch-case-bracesunicorn
text-encoding-identifier-caseunicorn
throw-new-errorunicorn

Nursery (8):

New lints that are still under development.

Rule nameSourceDefault
constructor-supereslint
getter-returneslint
no-undefeslint
no-unreachableeslint
exportimport
require-render-returnreact
rules-of-hooksreact
no-side-effects-in-initializationtree_shaking

Released under the MIT License.