# max-params

Rule `typescript/max-params`. Enforce a maximum number of parameters in function definitions

- Source: typescript
- Technologies: TypeScript
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 171.7K weekly downloads of presets that enable it
- Trend: +39.3% last quarter
- Rank: #1638 by reach, #1028 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `@typescript-eslint/max-params` | no | no | package `@typescript-eslint/eslint-plugin` | [docs](https://typescript-eslint.io/rules/max-params) |
| Biome | `complexity/useMaxParams` | no | no | group complexity, since 2.2.0 | [docs](https://biomejs.dev/linter/rules/use-max-params/) |

## Code examples

### Incorrect: the rule reports this

```ts
function hasNoThis(this: void, first: string, second: string) {
  // ...
}
```

### Correct: the rule accepts this

```ts
function hasNoThis(this: void, first: string) {
  // ...
}
```

Examples from the ESLint documentation.

## Enable it

### ESLint: `eslint.config.js`

```js
import tseslint from "typescript-eslint";

export default [
  {
    plugins: { "@typescript-eslint": tseslint.plugin },
    rules: {
      "@typescript-eslint/max-params": "error",
    },
  },
];
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "complexity": {
        "useMaxParams": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [eslint-config-love](https://lintradar.dev/presets/love.md) | ESLint | `eslint-config-love` | 258 | 171.7K | +39.3% |

## Related rules

- [eslint/max-params](https://lintradar.dev/rules/eslint/max-params.md): Enforce a maximum number of parameters in function definitions
- [typescript/no-magic-numbers](https://lintradar.dev/rules/typescript/no-magic-numbers.md): Disallow magic numbers
- [typescript/explicit-function-return-type](https://lintradar.dev/rules/typescript/explicit-function-return-type.md): Require explicit return types on functions and class methods
- [typescript/prefer-destructuring](https://lintradar.dev/rules/typescript/prefer-destructuring.md): Require destructuring from arrays and/or objects
- [typescript/class-methods-use-this](https://lintradar.dev/rules/typescript/class-methods-use-this.md): Enforce that class methods utilize `this`
- [typescript/init-declarations](https://lintradar.dev/rules/typescript/init-declarations.md): Require or disallow initialization in variable declarations

---

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