by typescript-eslint · @typescript-eslint/eslint-plugin
Consistency rules for TypeScript that do not change program behaviour, such as preferring interfaces or array type syntax.
pnpm add -D eslint typescript-eslint// eslint.config.js
import tseslint from "typescript-eslint";
export default [
...tseslint.configs.stylistic,
];| Rule | Severity | Linters | Reach | Trend |
|---|---|---|---|---|
| eslint/prefer-const | error | In ESLint, Oxlint, Biome | 221.9M | +34.2% |
| eslint/prefer-rest-params | error | In ESLint, Oxlint, Biome | 218.5M | +34.5% |
| eslint/no-var | error | In ESLint, Oxlint, Biome | 193.9M | +27.7% |
| eslint/prefer-spread | error | In ESLint, Oxlint, Biome | 190.5M | +27.9% |
| typescript/adjacent-overload-signatures | error | In ESLint, Oxlint, Biome | 74.2M | +52.3% |
| typescript/prefer-function-type | error | In ESLint, Oxlint, Biome | 74.2M | +52.3% |
| typescript/consistent-type-assertions | error | In ESLint, Oxlint | 50.3M | +28.6% |
| typescript/consistent-type-definitions | error | In ESLint, Oxlint, Biome | 47M | +31.5% |
| typescript/no-inferrable-types | error | In ESLint, Oxlint, Biome | 46.2M | +31.3% |
| typescript/prefer-for-of | error | In ESLint, Oxlint, Biome | 46.2M | +31.3% |
| typescript/class-literal-property-style | error | In ESLint, Oxlint | 46.2M | +31.3% |
| typescript/array-type | error | In ESLint, Oxlint, Biome | 46.2M | +31.3% |
| typescript/consistent-indexed-object-style | error | In ESLint, Oxlint, Biome | 46.2M | +31.3% |
| typescript/ban-tslint-comment | error | In ESLint, Oxlint | 46.2M | +31.3% |
| typescript/consistent-generic-constructors | error | In ESLint, Oxlint | 46.2M | +31.3% |
| typescript/no-confusing-non-null-assertion | error | In ESLint, Oxlint | 46.2M | +31.3% |
| typescript/no-empty-function | error | In ESLint, Biome | 46M | +27.1% |