---
title: "lint/functions/add-attribute-argument-names"
pagination: false
---

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

<RuleId id="lint/functions/add-attribute-argument-names" />

Not in any preset. In Rector's [`rector/named-args`](/docs/rules/sets/rector/named-args) set. Safe fix.

## What it does

Convert positional arguments on attributes into named arguments, using the attribute constructor parameter names

## Configuration

```toml title="pun.toml"
[lint.rules]
"functions/add-attribute-argument-names" = "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).

## Replaces

- [`ExplicitAttributeNamedArgs`](https://getrector.com/rule-detail/explicit-attribute-named-args-rector) (rector)

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