---
title: "lint/complexity/no-useless-array-values"
pagination: false
---

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

<RuleId id="lint/complexity/no-useless-array-values" />

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

## What it does

Removes unneeded array_values() in in_array() call

## Configuration

```toml title="pun.toml"
[lint.rules]
"complexity/no-useless-array-values" = "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

- [`SimplifyInArrayValues`](https://getrector.com/rule-detail/simplify-in-array-values-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)
