Skip to content

ESLint

88 rules eslint@10.11.0

Complete effective rule inventory.

Docs

Rules

40 rules on this page · 88 total

  • no-misleading-character-class

    Disallow characters which are made with multiple code points in character class syntax

    : warning in All ESLint contexts
    No autofix; suggestions available
  • no-new-func

    Disallow new operators with the Function object

    : error in Syntax-only tool configuration
    No autofix
  • no-new-native-nonconstructor

    Disallow new operators with global non-constructor functions

    : warning in JavaScript source, React JavaScript source
    No autofix
  • no-nonoctal-decimal-escape

    Disallow \8 and \9 escape sequences in string literals

    : warning in All ESLint contexts
    No autofix; suggestions available
  • no-obj-calls

    Disallow calling global object properties as functions

    : warning in JavaScript source, React JavaScript source
    No autofix
  • no-octal

    Disallow octal literals

    : warning in All ESLint contexts
    No autofix
  • no-param-reassign

    Disallow reassigning function parameters

    : error in All ESLint contexts
    No autofix
  • no-prototype-builtins

    Disallow calling some Object.prototype methods directly on objects

    : error in All ESLint contexts
    No autofix; suggestions available
  • no-redeclare

    Disallow variable redeclaration

    : warning in JavaScript source, React JavaScript source
    No autofix
  • no-regex-spaces

    Disallow multiple spaces in regular expressions

    : warning in All ESLint contexts
    Autofix available
  • no-restricted-imports

    Disallow specified modules when loaded by import

    : error in All ESLint contexts
    No autofix
  • no-restricted-syntax

    Disallow specified syntax

    : error in All ESLint contexts
    No autofix
  • no-return-await

    Disallow unnecessary return await

    : error in All ESLint contexts
    Autofix available; suggestions available
  • no-self-assign

    Disallow assignments where both sides are exactly the same

    : warning in All ESLint contexts
    No autofix
  • no-setter-return

    Disallow returning values from setters

    : warning in JavaScript source, React JavaScript source
    No autofix
  • no-shadow-restricted-names

    Disallow identifiers from shadowing restricted names

    : warning in All ESLint contexts
    No autofix
  • no-sparse-arrays

    Disallow sparse arrays

    : warning in All ESLint contexts
    No autofix
  • no-this-before-super

    Disallow this/super before calling super() in constructors

    : warning in JavaScript source, React JavaScript source
    No autofix
  • no-unassigned-vars

    Disallow let or var variables that are read but never assigned

    : warning in All ESLint contexts
    No autofix
  • no-undef

    Disallow the use of undeclared variables unless mentioned in /*global */ comments

    : warning in JavaScript source, React JavaScript source
    No autofix
  • no-undef-init

    Disallow initializing variables to undefined

    : error in All ESLint contexts
    Autofix available
  • no-unexpected-multiline

    Disallow confusing multiline expressions

    : warning in All ESLint contexts
    No autofix
  • no-unreachable

    Disallow unreachable code after return, throw, continue, and break statements

    : warning in JavaScript source, React JavaScript source
    No autofix
  • no-unsafe-finally

    Disallow control flow statements in finally blocks

    : warning in All ESLint contexts
    No autofix
  • no-unsafe-negation

    Disallow negating the left operand of relational operators

    : warning in JavaScript source, React JavaScript source
    Autofix available; suggestions available
  • no-unsafe-optional-chaining

    Disallow use of optional chaining in contexts where the undefined value is not allowed

    : warning in All ESLint contexts
    Autofix available
  • no-unused-labels

    Disallow unused labels

    : warning in All ESLint contexts
    Autofix available
  • no-unused-private-class-members

    Disallow unused private class members

    : warning in All ESLint contexts
    No autofix; suggestions available
  • no-useless-assignment

    Disallow variable assignments when the value is not used

    : warning in All ESLint contexts
    No autofix
  • no-useless-backreference

    Disallow useless backreferences in regular expressions

    : warning in All ESLint contexts
    No autofix
  • no-useless-catch

    Disallow unnecessary catch clauses

    : warning in All ESLint contexts
    No autofix
  • no-useless-computed-key

    Disallow unnecessary computed property keys in objects and classes

    : error in All ESLint contexts
    Autofix available
  • no-useless-escape

    Disallow unnecessary escape characters

    : warning in All ESLint contexts
    No autofix; suggestions available
  • no-useless-rename

    Disallow renaming import, export, and destructured assignments to the same name

    : error in All ESLint contexts
    Autofix available
  • no-useless-return

    Disallow redundant return statements

    : error in All ESLint contexts
    Autofix available
  • no-var

    Require let or const instead of var

    : error in All ESLint contexts
    Autofix available
  • no-with

    Disallow with statements

    : warning in JavaScript source, React JavaScript source
    No autofix
  • object-shorthand

    Require or disallow method and property shorthand syntax for object literals

    : error in All ESLint contexts
    Autofix available
  • prefer-arrow-callback

    Require using arrow functions for callbacks

    : error in All ESLint contexts
    Autofix available
  • prefer-const

    Require const declarations for variables that are never reassigned after declared

    : error in All ESLint contexts
    Autofix available