typescript-eslint
103 rules typescript-eslint@8.70.1
Complete effective rule inventory.
Rules
No enabled typescript-eslint rules match this search.
-
@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 -
@typescript-eslint/restrict-template-expressionsEnforce template literal expressions to be of
stringtype: 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/return-awaitEnforce consistent awaiting of returned promises
: 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/strict-void-returnDisallow passing a value-returning function in a position accepting a void function
: warning 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/switch-exhaustiveness-checkRequire switch-case statements to be exhaustive
: 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/triple-slash-referenceDisallow certain triple slash directives in favor of ES6-style import declarations
: error in All typescript-eslint contexts -
@typescript-eslint/unbound-methodEnforce unbound methods are called with their expected scope
: 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/unified-signaturesDisallow two overloads that could be unified into one with a union or an optional/rest parameter
: error in All typescript-eslint contexts -
@typescript-eslint/use-unknown-in-catch-callback-variableEnforce typing arguments in Promise rejection callbacks as
unknown: error in TypeScript source, React source, JavaScript source, React JavaScript source, TypeScript tests, Bun tests, Playwright end-to-end tests, Design-system React source