# max-params

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

- Source: eslint
- Technologies: JavaScript
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 444.4K weekly downloads of presets that enable it
- Trend: −3.1% last quarter
- Rank: #1614 by reach, #1625 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `max-params` | no | no | package `eslint` | [docs](https://eslint.org/docs/latest/rules/max-params) |
| Oxlint | `max-params` | no | no | plugin `eslint`, category style | [docs](https://oxc.rs/docs/guide/usage/linter/rules/eslint/max-params.html) |
| 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

```js
function foo1 (bar, baz, qux, qxx) {
    doSomething();
}

let foo2 = (bar, baz, qux, qxx) => {
    doSomething();
};
```

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

```ts
function hasThis(this: unknown[], first: string, second: string) {
  // ...
}
```

### Correct: the rule accepts this

```js
function foo1 (bar, baz, qux) {
    doSomething();
}

let foo2 = (bar, baz, qux) => {
    doSomething();
};
```

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

```ts
function hasThis(this: unknown[], first: string, second: string) {
  // ...
}
```

Examples from the ESLint documentation.

## Enable it

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

```js
export default [
  {
    rules: {
      "max-params": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "rules": {
    "max-params": "error"
  }
}
```

### Biome: `biome.json`

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

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [XO](https://lintradar.dev/presets/xo.md) | ESLint | `eslint-config-xo` | 618 | 413K | −5.0% |
| [Alloy](https://lintradar.dev/presets/alloy.md) | ESLint | `eslint-config-alloy` | 166 | 31.4K | +32.4% |

## Related rules

- [typescript/max-params](https://lintradar.dev/rules/typescript/max-params.md): Enforce a maximum number of parameters in function definitions
- [eslint/no-implicit-coercion](https://lintradar.dev/rules/eslint/no-implicit-coercion.md): Disallow shorthand type conversions
- [eslint/max-lines](https://lintradar.dev/rules/eslint/max-lines.md): Enforce a maximum number of lines per file
- [eslint/capitalized-comments](https://lintradar.dev/rules/eslint/capitalized-comments.md): Enforce or disallow capitalization of the first letter of a comment
- [eslint/max-depth](https://lintradar.dev/rules/eslint/max-depth.md): Enforce a maximum depth that blocks can be nested
- [eslint/no-invalid-this](https://lintradar.dev/rules/eslint/no-invalid-this.md): Disallow use of `this` in contexts where the value of `this` is `undefined`

---

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