# typescript-eslint stylistic

Consistency rules for TypeScript that do not change program behaviour, such as preferring interfaces or array type syntax.

- Linter: ESLint
- Package: `@typescript-eslint/eslint-plugin` (https://typescript-eslint.io/users/configs#stylistic)
- Author: typescript-eslint (official)
- Rules: 17
- Weekly downloads: 175.9M, +29.5% last quarter
- Technologies: typescript (13), 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.stylistic,
];
```

## Rules it enables

| Rule | Severity | Description | Reach |
| --- | --- | --- | --- |
| [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 |
| [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/adjacent-overload-signatures](https://lintradar.dev/rules/typescript/adjacent-overload-signatures.md) | error | Require that function overload signatures be consecutive | 75.2M |
| [typescript/prefer-function-type](https://lintradar.dev/rules/typescript/prefer-function-type.md) | error | Enforce using function types instead of interfaces with call signatures | 75.2M |
| [typescript/consistent-type-assertions](https://lintradar.dev/rules/typescript/consistent-type-assertions.md) | error | Enforce consistent usage of type assertions | 50.7M |
| [typescript/consistent-type-definitions](https://lintradar.dev/rules/typescript/consistent-type-definitions.md) | error | Enforce type definitions to consistently use either `interface` or `type` | 47.4M |
| [typescript/no-inferrable-types](https://lintradar.dev/rules/typescript/no-inferrable-types.md) | error | Disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean | 46.7M |
| [typescript/prefer-for-of](https://lintradar.dev/rules/typescript/prefer-for-of.md) | error | Enforce the use of `for-of` loop over the standard `for` loop where possible | 46.7M |
| [typescript/class-literal-property-style](https://lintradar.dev/rules/typescript/class-literal-property-style.md) | error | Enforce that literals on classes are exposed in a consistent style | 46.7M |
| [typescript/array-type](https://lintradar.dev/rules/typescript/array-type.md) | error | Require consistently using either `T[]` or `Array<T>` for arrays | 46.6M |
| [typescript/consistent-indexed-object-style](https://lintradar.dev/rules/typescript/consistent-indexed-object-style.md) | error | Require or disallow the `Record` type | 46.6M |
| [typescript/ban-tslint-comment](https://lintradar.dev/rules/typescript/ban-tslint-comment.md) | error | Disallow `// tslint:<rule-flag>` comments | 46.6M |
| [typescript/consistent-generic-constructors](https://lintradar.dev/rules/typescript/consistent-generic-constructors.md) | error | Enforce specifying generic type arguments on type annotation or constructor name of a constructor call | 46.6M |
| [typescript/no-confusing-non-null-assertion](https://lintradar.dev/rules/typescript/no-confusing-non-null-assertion.md) | error | Disallow non-null assertion in locations that may be confusing | 46.6M |
| [typescript/no-empty-function](https://lintradar.dev/rules/typescript/no-empty-function.md) | error | Disallow empty functions | 46.4M |

---

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