---
title: "lint/complexity/no-concat-assign-new-item"
pagination: false
---

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

<RuleId id="lint/complexity/no-concat-assign-new-item" />

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

## What it does

Change concat assign on a new array item to plain assign, as the new item is always null

## Configuration

```toml title="pun.toml"
[lint.rules]
"complexity/no-concat-assign-new-item" = "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

- [`NewArrayItemConcatAssignToAssign`](https://getrector.com/rule-detail/new-array-item-concat-assign-to-assign-rector) (rector)

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