Skip to content

typescript-eslint

103 rules typescript-eslint@8.70.1

Complete effective rule inventory.

Docs

Rules

40 rules on this page · 103 total

  • @typescript-eslint/no-mixed-enums

    Disallow enums from having both number and string members

    : error in TypeScript source, React source, JavaScript source, React JavaScript source, TypeScript tests, Bun tests, Playwright end-to-end tests, Design-system React source
    No autofix
  • @typescript-eslint/no-namespace

    Disallow TypeScript namespaces

    : error in All typescript-eslint contexts
    No autofix
  • @typescript-eslint/no-non-null-asserted-nullish-coalescing

    Disallow non-null assertions in the left operand of a nullish coalescing operator

    : error in All typescript-eslint contexts
    No autofix; suggestions available
  • @typescript-eslint/no-non-null-asserted-optional-chain

    Disallow non-null assertions after an optional chain expression

    : error in All typescript-eslint contexts
    No autofix; suggestions available
  • @typescript-eslint/no-non-null-assertion

    Disallow non-null assertions using the ! postfix operator

    : error in TypeScript source, React source, JavaScript source, React JavaScript source, Syntax-only tool configuration, Design-system React source
    No autofix; suggestions available
  • @typescript-eslint/no-redundant-type-constituents

    Disallow members of unions and intersections that do nothing or override type information

    : error in TypeScript source, React source, JavaScript source, React JavaScript source, TypeScript tests, Bun tests, Playwright end-to-end tests, Design-system React source
    No autofix
  • @typescript-eslint/no-require-imports

    Disallow invocation of require()

    : error in All typescript-eslint contexts
    No autofix
  • @typescript-eslint/no-shadow

    Disallow variable declarations from shadowing variables declared in the outer scope

    : error in All typescript-eslint contexts
    No autofix
  • @typescript-eslint/no-this-alias

    Disallow aliasing this

    : error in All typescript-eslint contexts
    No autofix
  • @typescript-eslint/no-unnecessary-boolean-literal-compare

    Disallow unnecessary equality comparisons against boolean literals

    : error in TypeScript source, React source, JavaScript source, React JavaScript source, TypeScript tests, Bun tests, Playwright end-to-end tests, Design-system React source
    Autofix available
  • @typescript-eslint/no-unnecessary-condition

    Disallow conditionals where the type is always truthy or always falsy

    : error in TypeScript source, React source, JavaScript source, React JavaScript source, TypeScript tests, Bun tests, Playwright end-to-end tests, Design-system React source
    No autofix; suggestions available
  • @typescript-eslint/no-unnecessary-qualifier

    Disallow unnecessary namespace qualifiers

    : error in TypeScript source, React source, JavaScript source, React JavaScript source, TypeScript tests, Bun tests, Playwright end-to-end tests, Design-system React source
    Autofix available
  • @typescript-eslint/no-unnecessary-template-expression

    Disallow unnecessary template expressions

    : error in TypeScript source, React source, JavaScript source, React JavaScript source, TypeScript tests, Bun tests, Playwright end-to-end tests, Design-system React source
    Autofix available
  • @typescript-eslint/no-unnecessary-type-arguments

    Disallow type arguments that are equal to the default

    : error in TypeScript source, React source, JavaScript source, React JavaScript source, TypeScript tests, Bun tests, Playwright end-to-end tests, Design-system React source
    Autofix available
  • @typescript-eslint/no-unnecessary-type-assertion

    Disallow type assertions that do not change the type of an expression

    : error in TypeScript source, React source, JavaScript source, React JavaScript source, TypeScript tests, Bun tests, Playwright end-to-end tests, Design-system React source
    Autofix available
  • @typescript-eslint/no-unnecessary-type-constraint

    Disallow unnecessary constraints on generic types

    : error in All typescript-eslint contexts
    No autofix; suggestions available
  • @typescript-eslint/no-unnecessary-type-conversion

    Disallow conversion idioms when they do not change the type or value of the expression

    : error in TypeScript source, React source, JavaScript source, React JavaScript source, TypeScript tests, Bun tests, Playwright end-to-end tests, Design-system React source
    No autofix; suggestions available
  • @typescript-eslint/no-unnecessary-type-parameters

    Disallow type parameters that aren't used multiple times

    : error in TypeScript source, React source, JavaScript source, React JavaScript source, TypeScript tests, Bun tests, Playwright end-to-end tests, Design-system React source
    No autofix; suggestions available
  • @typescript-eslint/no-unsafe-argument

    Disallow calling a function with a value with type any

    : error in TypeScript source, React source, JavaScript source, React JavaScript source, TypeScript tests, Bun tests, Playwright end-to-end tests, Design-system React source
    No autofix
  • @typescript-eslint/no-unsafe-assignment

    Disallow assigning a value with type any to variables and properties

    : error in TypeScript source, React source, JavaScript source, React JavaScript source, Design-system React source
    No autofix
  • @typescript-eslint/no-unsafe-call

    Disallow calling a value with type any

    : error in TypeScript source, React source, JavaScript source, React JavaScript source, TypeScript tests, Bun tests, Playwright end-to-end tests, Design-system React source
    No autofix
  • @typescript-eslint/no-unsafe-declaration-merging

    Disallow unsafe declaration merging

    : error in All typescript-eslint contexts
    No autofix
  • @typescript-eslint/no-unsafe-enum-comparison

    Disallow comparing an enum value with a non-enum value

    : error in TypeScript source, React source, JavaScript source, React JavaScript source, TypeScript tests, Bun tests, Playwright end-to-end tests, Design-system React source
    No autofix; suggestions available
  • @typescript-eslint/no-unsafe-function-type

    Disallow using the unsafe built-in Function type

    : error in All typescript-eslint contexts
    No autofix
  • @typescript-eslint/no-unsafe-member-access

    Disallow member access on a value with type any

    : error in TypeScript source, React source, JavaScript source, React JavaScript source, Design-system React source
    No autofix
  • @typescript-eslint/no-unsafe-return

    Disallow returning a value with type any from a function

    : error in TypeScript source, React source, JavaScript source, React JavaScript source, TypeScript tests, Bun tests, Playwright end-to-end tests, Design-system React source
    No autofix
  • @typescript-eslint/no-unsafe-type-assertion

    Disallow type assertions that narrow a type

    : error in TypeScript source, React source, JavaScript source, React JavaScript source, Design-system React source
    No autofix
  • @typescript-eslint/no-unsafe-unary-minus

    Require unary negation to take a number

    : error in TypeScript source, React source, JavaScript source, React JavaScript source, TypeScript tests, Bun tests, Playwright end-to-end tests, Design-system React source
    No autofix
  • @typescript-eslint/no-unused-expressions

    Disallow unused expressions

    : error in All typescript-eslint contexts
    No autofix
  • @typescript-eslint/no-unused-vars

    Disallow unused variables

    : error in All typescript-eslint contexts
    Autofix available; suggestions available
  • @typescript-eslint/no-useless-constructor

    Disallow unnecessary constructors

    : error in All typescript-eslint contexts
    No autofix; suggestions available
  • @typescript-eslint/no-useless-default-assignment

    Disallow default values that will never be used

    : error in TypeScript source, React source, JavaScript source, React JavaScript source, TypeScript tests, Bun tests, Playwright end-to-end tests, Design-system React source
    No autofix; suggestions available
  • @typescript-eslint/no-useless-empty-export

    Disallow empty exports that don't change anything in a module file

    : error in All typescript-eslint contexts
    Autofix available
  • @typescript-eslint/no-wrapper-object-types

    Disallow using confusing built-in primitive class wrappers

    : error in All typescript-eslint contexts
    Autofix available
  • @typescript-eslint/non-nullable-type-assertion-style

    Enforce non-null assertions over explicit type assertions

    : error in TypeScript source, React source, JavaScript source, React JavaScript source, TypeScript tests, Bun tests, Playwright end-to-end tests, Design-system React source
    Autofix available
  • @typescript-eslint/only-throw-error

    Disallow throwing non-Error values as exceptions

    : error in TypeScript source, React source, JavaScript source, React JavaScript source, TypeScript tests, Bun tests, Playwright end-to-end tests, Design-system React source
    No autofix
  • @typescript-eslint/prefer-as-const

    Enforce the use of as const over literal type

    : error in All typescript-eslint contexts
    Autofix available; suggestions available
  • @typescript-eslint/prefer-find

    Enforce the use of Array.prototype.find() over Array.prototype.filter() followed by [0] when looking for a single result

    : error in TypeScript source, React source, JavaScript source, React JavaScript source, TypeScript tests, Bun tests, Playwright end-to-end tests, Design-system React source
    No autofix; suggestions available
  • @typescript-eslint/prefer-for-of

    Enforce the use of for-of loop over the standard for loop where possible

    : error in All typescript-eslint contexts
    No autofix
  • @typescript-eslint/prefer-function-type

    Enforce using function types instead of interfaces with call signatures

    : error in All typescript-eslint contexts
    Autofix available