---
title: "lint/dead-code/no-redundant-default-argument"
pagination: false
---

{/* Generated by scripts/gen-rule-docs.py. Edit mapping.toml, not this file. */}

<RuleId id="lint/dead-code/no-redundant-default-argument" />

In the [`dead-code`](/docs/rules/sets/dead-code) set. Safe fix.

## What it does

Remove arguments that equal the parameter default value.

## Configuration

```toml title="pun.toml"
[lint.rules]
"dead-code/no-redundant-default-argument" = "error"
```

To skip it in some files or lines, add an [override](/docs/configuration/pun-toml#lint) or an [ignore comment](/docs/configuration/ignore-comments).

## Options

| Name | Type | Allowed values | Default | Upstream name |
| --- | --- | --- | --- | --- |
| `checks` | `list` | `null`, `null-named`, `parent-call` | `["null", "null-named", "parent-call"]` | None (Pun's own) |

## Replaces

- [`RemoveArgumentFromDefaultParentCall`](https://getrector.com/rule-detail/remove-argument-from-default-parent-call-rector) (rector)
- [`RemoveNullArgOnNullDefaultParam`](https://getrector.com/rule-detail/remove-null-arg-on-null-default-param-rector) (rector)
- [`RemoveNullNamedArgOnNullDefaultParam`](https://getrector.com/rule-detail/remove-null-named-arg-on-null-default-param-rector) (rector)

## Merged rules

These old IDs are now this rule. A config that still names one stops with an error. See [merged rules](/docs/migrate/merged-rules).

- `lint/dead-code/no-null-default-argument`
- `lint/dead-code/no-null-default-named-argument`

[More lint/dead-code rules](/docs/rules/lint/dead-code) · [Edit this page](https://github.com/shipfastlabs/pun/edit/main/crates/pun-config/rules/mapping.toml)
