Skip to content
Sarj Code Standards

TypeScript

95 rules oxlint@1.91.0

Complete effective rule inventory.

Docs

Rules

32 rules on this page · 95 total

  • typescript/adjacent-overload-signatures

    Require that function overload signatures be consecutive

    : error in All TypeScript contexts
    No autofix
  • typescript/array-type

    Require consistently using either T[] or Array<T> for arrays

    : error in All TypeScript contexts
    Autofix available
  • typescript/await-thenable

    Disallow awaiting a value that is not a Thenable

    : 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/ban-ts-comment

    Disallow @ts-<directive> comments or require descriptions after directives

    : error in All TypeScript contexts
    Autofix available
  • typescript/ban-tslint-comment

    Disallow // tslint:<rule-flag> comments

    : error in All TypeScript contexts
    Autofix available
  • typescript/class-literal-property-style

    Enforce that literals on classes are exposed in a consistent style

    : error in All TypeScript contexts
    No autofix; suggestions available
  • typescript/consistent-generic-constructors

    Enforce specifying generic type arguments on type annotation or constructor name of a constructor call

    : error in All TypeScript contexts
    Autofix available
  • typescript/consistent-indexed-object-style

    Require or disallow the Record type

    : error in All TypeScript contexts
    Autofix available
  • typescript/consistent-type-assertions

    Enforce consistent usage of type assertions

    : error in TypeScript source, React source, JavaScript source, React JavaScript source, Syntax-only tool configuration, Design-system React source
    Autofix available; suggestions available
  • typescript/consistent-type-definitions

    Enforce type definitions to consistently use either interface or type

    : error in All TypeScript contexts
    Autofix available
  • typescript/consistent-type-exports

    Enforce consistent usage of type exports

    : 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/consistent-type-imports

    Enforce consistent usage of type imports

    : error in All TypeScript contexts
    Autofix available
  • typescript/dot-notation

    Enforce dot notation whenever possible

    : 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/no-array-delete

    Disallow using the delete operator on array values

    : 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/no-base-to-string

    Require .toString() and .toLocaleString() to only be called on objects which provide useful information when stringified

    : 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/no-confusing-non-null-assertion

    Disallow non-null assertion in locations that may be confusing

    : error in All TypeScript contexts
    Autofix available; suggestions available
  • typescript/no-confusing-void-expression

    Require expressions of type void to appear in statement position

    : 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/no-deprecated

    Disallow using code marked as @deprecated

    : 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/no-duplicate-enum-values

    Disallow duplicate enum member values

    : error in All TypeScript contexts
    No autofix
  • typescript/no-duplicate-type-constituents

    Disallow duplicate constituents of union or intersection types

    : 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/no-dynamic-delete

    Disallow using the delete operator on computed key expressions

    : error in All TypeScript contexts
    No autofix
  • typescript/no-empty-object-type

    Disallow accidentally using the "empty object" type

    : error in All TypeScript contexts
    No autofix; suggestions available
  • typescript/no-explicit-any

    Disallow the any type

    : error in All TypeScript contexts
    Autofix available
  • typescript/no-extra-non-null-assertion

    Disallow extra non-null assertions

    : error in All TypeScript contexts
    Autofix available
  • typescript/no-extraneous-class

    Disallow classes used as namespaces

    : error in All TypeScript contexts
    Autofix available; suggestions available
  • typescript/no-floating-promises

    Require Promise-like statements to be handled appropriately

    : 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/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/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/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 contexts
    Autofix available
  • typescript/no-invalid-void-type

    Disallow void type outside of generic or return types

    : error in All TypeScript contexts
    No autofix
  • typescript/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/no-misused-new

    Enforce valid definition of new and constructor

    : error in All TypeScript contexts
    No autofix