Skip to content

typescript-eslint

103 rules typescript-eslint@8.70.1

Complete effective rule inventory.

Docs

Rules

32 rules on this page · 103 total

  • @typescript-eslint/no-generated-empty-object-type

    Disallow type operations that resolve to the "empty object" type

    : 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-implied-eval

    Disallow the use of eval()-like functions

    : 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-import-type-side-effects

    Enforce the use of top-level import type qualifier when an import only has specifiers with inline type qualifiers

    : error in All typescript-eslint contexts
    Autofix available
  • @typescript-eslint/no-invalid-void-type

    Disallow void type outside of generic or return types

    : error in All typescript-eslint contexts
    No autofix
  • @typescript-eslint/no-meaningless-void-operator

    Disallow the void operator except when used to discard a 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
    Autofix available; suggestions available
  • @typescript-eslint/no-misused-new

    Enforce valid definition of new and constructor

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

    Disallow Promises in places not designed to handle them

    : 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-misused-spread

    Disallow using the spread operator when it might cause unexpected behavior

    : 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-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