---
title: "lint/arrays"
pagination: false
---

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

Array literals, list() destructuring and array access. Also in [format](/docs/rules/format/arrays) (12) and [analyse](/docs/rules/analyse/arrays) (3).

**[no-implicit-array-creation](/docs/rules/lint/arrays/no-implicit-array-creation)**

Disallows implicit array creation: appending to or writing an offset of an undefined or `null` variable.

In the `code-quality` set. Report only. Intent: suspicious. Upstream gates: `strictRules.disallowedImplicitArrayCreation`.

**[prefer-array-spread](/docs/rules/lint/arrays/prefer-array-spread)**

Detects calls to `array_merge()` and suggests using the array spread operator (`...`) in an array literal instead.

In the `modernize` set. Unsafe fix: it can change behaviour.
