# typescript-eslint recommended

Correctness rules for TypeScript code that do not need type information. The usual starting point for TypeScript projects.

- Linter: ESLint
- Package: `@typescript-eslint/eslint-plugin` (https://typescript-eslint.io/users/configs#recommended)
- Author: typescript-eslint (official)
- Rules: 24
- Weekly downloads: 175.9M, +29.5% last quarter
- Technologies: typescript (20), javascript (4)

## Install

```sh
npm install -D eslint typescript-eslint
pnpm add -D eslint typescript-eslint
yarn add -D eslint typescript-eslint
bun add -d eslint typescript-eslint
```

## Config: `eslint.config.js`

```js
// eslint.config.js
import tseslint from "typescript-eslint";

export default [
  ...tseslint.configs.recommended,
];
```

## Rules it enables

| Rule | Severity | Description | Reach |
| --- | --- | --- | --- |
| [typescript/no-duplicate-enum-values](https://lintradar.dev/rules/typescript/no-duplicate-enum-values.md) | error | Disallow duplicate enum member values | 260.7M |
| [typescript/no-non-null-asserted-optional-chain](https://lintradar.dev/rules/typescript/no-non-null-asserted-optional-chain.md) | error | Disallow non-null assertions after an optional chain expression | 260.7M |
| [typescript/no-this-alias](https://lintradar.dev/rules/typescript/no-this-alias.md) | error | Disallow aliasing `this` | 260.7M |
| [typescript/prefer-namespace-keyword](https://lintradar.dev/rules/typescript/prefer-namespace-keyword.md) | error | Require using `namespace` keyword over `module` keyword to declare custom TypeScript modules | 260.7M |
| [typescript/no-extra-non-null-assertion](https://lintradar.dev/rules/typescript/no-extra-non-null-assertion.md) | error | Disallow extra non-null assertions | 260.7M |
| [typescript/no-misused-new](https://lintradar.dev/rules/typescript/no-misused-new.md) | error | Enforce valid definition of `new` and `constructor` | 260.7M |
| [typescript/no-unsafe-declaration-merging](https://lintradar.dev/rules/typescript/no-unsafe-declaration-merging.md) | error | Disallow unsafe declaration merging | 260.7M |
| [typescript/triple-slash-reference](https://lintradar.dev/rules/typescript/triple-slash-reference.md) | error | Disallow certain triple slash directives in favor of ES6-style import declarations | 260M |
| [typescript/prefer-as-const](https://lintradar.dev/rules/typescript/prefer-as-const.md) | error | Enforce the use of `as const` over literal type | 232.2M |
| [typescript/no-wrapper-object-types](https://lintradar.dev/rules/typescript/no-wrapper-object-types.md) | error | Disallow using confusing built-in primitive class wrappers | 232.2M |
| [eslint/prefer-const](https://lintradar.dev/rules/eslint/prefer-const.md) | error | Require `const` declarations for variables that are never reassigned after declared | 223.9M |
| [eslint/prefer-rest-params](https://lintradar.dev/rules/eslint/prefer-rest-params.md) | error | Require rest parameters instead of `arguments` | 220.5M |
| [typescript/no-unnecessary-type-constraint](https://lintradar.dev/rules/typescript/no-unnecessary-type-constraint.md) | error | Disallow unnecessary constraints on generic types | 209.9M |
| [typescript/ban-ts-comment](https://lintradar.dev/rules/typescript/ban-ts-comment.md) | error | Disallow `@ts-<directive>` comments or require descriptions after directives | 209.9M |
| [typescript/no-explicit-any](https://lintradar.dev/rules/typescript/no-explicit-any.md) | error | Disallow the `any` type | 208.7M |
| [eslint/no-var](https://lintradar.dev/rules/eslint/no-var.md) | error | Require `let` or `const` instead of `var` | 195.4M |
| [eslint/prefer-spread](https://lintradar.dev/rules/eslint/prefer-spread.md) | error | Require spread operators instead of `.apply()` | 192M |
| [typescript/no-unused-vars](https://lintradar.dev/rules/typescript/no-unused-vars.md) | error | Disallow unused variables | 185.6M |
| [typescript/no-array-constructor](https://lintradar.dev/rules/typescript/no-array-constructor.md) | error | Disallow generic `Array` constructors | 185.6M |
| [typescript/no-unused-expressions](https://lintradar.dev/rules/typescript/no-unused-expressions.md) | error | Disallow unused expressions | 184.8M |
| [typescript/no-unsafe-function-type](https://lintradar.dev/rules/typescript/no-unsafe-function-type.md) | error | Disallow using the unsafe built-in Function type | 181.4M |
| [typescript/no-empty-object-type](https://lintradar.dev/rules/typescript/no-empty-object-type.md) | error | Disallow accidentally using the "empty object" type | 180.8M |
| [typescript/no-namespace](https://lintradar.dev/rules/typescript/no-namespace.md) | error | Disallow TypeScript namespaces | 180.7M |
| [typescript/no-require-imports](https://lintradar.dev/rules/typescript/no-require-imports.md) | error | Disallow invocation of `require()` | 178.1M |

---

Web page: https://lintradar.dev/presets/typescript-eslint-recommended. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
