# default-param-last

Rule `eslint/default-param-last`. Enforce default parameters to be last

- Source: eslint
- Technologies: JavaScript
- Kind: style
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 12M weekly downloads of presets that enable it
- Trend: +13.8% last quarter
- Rank: #832 by reach, #1418 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `default-param-last` | no | no | package `eslint` | [docs](https://eslint.org/docs/latest/rules/default-param-last) |
| Oxlint | `default-param-last` | no | no | plugin `eslint`, category style | [docs](https://oxc.rs/docs/guide/usage/linter/rules/eslint/default-param-last.html) |
| Biome | `style/useDefaultParameterLast` | no | unsafe | group style, since 1.0.0 | [docs](https://biomejs.dev/linter/rules/use-default-parameter-last/) |

## Code examples

### Incorrect: the rule reports this

```js
function f(a = 0, b) {}

function g(a, b = 0, c) {}
```

```ts
function h(a = 0, b: number) {}
```

### Correct: the rule accepts this

```js
function f(a, b = 0) {}

function g(a, b = 0, c = 0) {}
```

```ts
function h(a = 0, b?: number) {}
```

Examples from the ESLint documentation.

## Enable it

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

```js
export default [
  {
    rules: {
      "default-param-last": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "rules": {
    "default-param-last": "error"
  }
}
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "style": {
        "useDefaultParameterLast": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Airbnb base](https://lintradar.dev/presets/airbnb-base.md) | ESLint | `eslint-config-airbnb-base` | 241 | 6.5M | +2.1% |
| [Airbnb](https://lintradar.dev/presets/airbnb.md) | ESLint | `eslint-config-airbnb` | 346 | 3.4M | +2.3% |
| [Ultracite for Biome](https://lintradar.dev/presets/ultracite-biome.md) | Biome | `ultracite` | 616 | 2.1M | +151.7% |
| [Ultracite for Oxlint](https://lintradar.dev/presets/ultracite-oxlint.md) | Oxlint | `ultracite` | 475 | 2.1M | +151.7% |

## Related rules

- [typescript/default-param-last](https://lintradar.dev/rules/typescript/default-param-last.md): Enforce default parameters to be last
- [eslint/default-case](https://lintradar.dev/rules/eslint/default-case.md): Require `default` cases in `switch` statements
- [eslint/max-classes-per-file](https://lintradar.dev/rules/eslint/max-classes-per-file.md): Enforce a maximum number of classes per file
- [eslint/class-methods-use-this](https://lintradar.dev/rules/eslint/class-methods-use-this.md): Enforce that class methods utilize `this`
- [eslint/no-nested-ternary](https://lintradar.dev/rules/eslint/no-nested-ternary.md): Disallow nested ternary expressions
- [eslint/no-empty-function](https://lintradar.dev/rules/eslint/no-empty-function.md): Disallow empty functions

---

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