# Errors

Rules which relate to productions which are almost always erroneous or cause unexpected behavior.

# Rules

Name Description
for-direction Disallow for loops which update their counter in the wrong direction.
getter-return Disallow getter properties which do not always return a value.
no-async-promise-executor Disallow async functions as promise executors.
no-await-in-loop Disallow await inside of loops.
no-compare-neg-zero Disallow comparison against -0 which yields unexpected behavior.
no-cond-assign Forbid the use of assignment expressions in conditions which may yield unwanted behavior.
no-confusing-arrow Disallow arrow functions where they could be confused with comparisons.
no-constant-condition Disallow constant conditions which always yield one result.
no-debugger Disallow the use of debugger statements.
no-dupe-keys Disallow duplicate keys in object literals.
no-duplicate-cases Disallow duplicate test cases in switch statements.
no-empty Disallow empty block statements.
no-extra-boolean-cast Disallow unnecessary boolean casts.
no-extra-semi Disallow unneeded semicolons.
no-inner-declarations Disallow variable and function declarations in nested blocks.
no-irregular-whitespace Disallow weird/irregular whitespace.
no-new-symbol Disallow constructing Symbol using new.
no-prototype-builtins Disallow direct use of Object.prototype builtins directly.
no-setter-return Disallow setters to return values.
no-sparse-arrays Disallow sparse arrays.
no-unexpected-multiline Disallow confusing newlines in expressions.
no-unsafe-finally Forbid the use of unsafe control flow statements in try and catch blocks.
no-unsafe-negation Deny the use of ! on the left hand side of an instanceof or in expression where it is ambiguous.
use-isnan Disallow incorrect comparisons against NaN.
valid-typeof Enforce the use of valid string literals in a typeof comparison.

Source (opens new window)

Last Updated: 11/18/2020, 9:36:33 PM