typescript-eslint
104 rules typescript-eslint@8.71.2
Complete effective rule inventory.
Rules
No enabled typescript-eslint rules match this search.
-
@typescript-eslint/no-unsafe-function-typeDisallow using the unsafe built-in Function type
: error in All typescript-eslint contexts -
@typescript-eslint/no-unsafe-member-accessDisallow member access on a value with type
any: error in TypeScript source, React source, JavaScript source, React JavaScript source, Design-system React source -
@typescript-eslint/no-unsafe-returnDisallow returning a value with type
anyfrom 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 -
@typescript-eslint/no-unsafe-type-assertionDisallow type assertions that narrow a type
: error in TypeScript source, React source, JavaScript source, React JavaScript source, Design-system React source -
@typescript-eslint/no-unsafe-unary-minusRequire 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 -
@typescript-eslint/no-unused-expressionsDisallow unused expressions
: error in All typescript-eslint contexts -
@typescript-eslint/no-unused-varsDisallow unused variables
: error in All typescript-eslint contexts -
@typescript-eslint/no-useless-constructorDisallow unnecessary constructors
: error in All typescript-eslint contexts -
@typescript-eslint/no-useless-default-assignmentDisallow 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 -
@typescript-eslint/no-useless-empty-exportDisallow empty exports that don't change anything in a module file
: error in All typescript-eslint contexts -
@typescript-eslint/no-wrapper-object-typesDisallow using confusing built-in primitive class wrappers
: error in All typescript-eslint contexts -
@typescript-eslint/non-nullable-type-assertion-styleEnforce 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 -
@typescript-eslint/only-throw-errorDisallow throwing non-
Errorvalues 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 -
@typescript-eslint/prefer-as-constEnforce the use of
as constover literal type: error in All typescript-eslint contexts -
@typescript-eslint/prefer-findEnforce 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 -
@typescript-eslint/prefer-for-ofEnforce the use of
for-ofloop over the standardforloop where possible: error in All typescript-eslint contexts -
@typescript-eslint/prefer-function-typeEnforce using function types instead of interfaces with call signatures
: error in All typescript-eslint contexts -
@typescript-eslint/prefer-includesEnforce
includesmethod overindexOfmethod: error in TypeScript source, React source, JavaScript source, React JavaScript source, TypeScript tests, Bun tests, Playwright end-to-end tests, Design-system React source -
@typescript-eslint/prefer-literal-enum-memberRequire all enum members to be literal values
: error in All typescript-eslint contexts -
@typescript-eslint/prefer-namespace-keywordRequire using
namespacekeyword overmodulekeyword to declare custom TypeScript modules: error in All typescript-eslint contexts -
@typescript-eslint/prefer-nullish-coalescingEnforce using the nullish coalescing operator instead of logical assignments or chaining
: error in TypeScript source, React source, JavaScript source, React JavaScript source, TypeScript tests, Bun tests, Playwright end-to-end tests, Design-system React source -
@typescript-eslint/prefer-optional-chainEnforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects
: error in TypeScript source, React source, JavaScript source, React JavaScript source, TypeScript tests, Bun tests, Playwright end-to-end tests, Design-system React source -
@typescript-eslint/prefer-promise-reject-errorsRequire using Error objects as Promise rejection reasons
: error in TypeScript source, React source, JavaScript source, React JavaScript source, TypeScript tests, Bun tests, Playwright end-to-end tests, Design-system React source -
@typescript-eslint/prefer-readonlyRequire private members to be marked as
readonlyif they're never modified outside of the constructor: error in TypeScript source, React source, JavaScript source, React JavaScript source, TypeScript tests, Bun tests, Playwright end-to-end tests, Design-system React source -
@typescript-eslint/prefer-reduce-type-parameterEnforce using type parameter when calling
Array#reduceinstead of using a type assertion: error in TypeScript source, React source, JavaScript source, React JavaScript source, TypeScript tests, Bun tests, Playwright end-to-end tests, Design-system React source -
@typescript-eslint/prefer-regexp-execEnforce
RegExp#execoverString#matchif no global flag is provided: error in TypeScript source, React source, JavaScript source, React JavaScript source, TypeScript tests, Bun tests, Playwright end-to-end tests, Design-system React source -
@typescript-eslint/prefer-return-this-typeEnforce that
thisis used when onlythistype is returned: error in TypeScript source, React source, JavaScript source, React JavaScript source, TypeScript tests, Bun tests, Playwright end-to-end tests, Design-system React source -
@typescript-eslint/prefer-string-starts-ends-withEnforce using
String#startsWithandString#endsWithover other equivalent methods of checking substrings: error in TypeScript source, React source, JavaScript source, React JavaScript source, TypeScript tests, Bun tests, Playwright end-to-end tests, Design-system React source -
@typescript-eslint/related-getter-setter-pairsEnforce that
get()types should be assignable to their equivalentset()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 -
@typescript-eslint/require-array-sort-compareRequire
Array#sortandArray#toSortedcalls to always provide acompareFunction: error in TypeScript source, React source, JavaScript source, React JavaScript source, TypeScript tests, Bun tests, Playwright end-to-end tests, Design-system React source -
@typescript-eslint/require-awaitDisallow async functions which do not return promises and have no
awaitexpression: error in TypeScript source, React source, JavaScript source, React JavaScript source, Design-system React source -
@typescript-eslint/restrict-plus-operandsRequire both operands of addition to be the same type and be
bigint,number, orstring: error in TypeScript source, React source, JavaScript source, React JavaScript source, TypeScript tests, Bun tests, Playwright end-to-end tests, Design-system React source