noSparseArray (since v1.0.0)
Diagnostic Category: lint/suspicious/noSparseArray
Source: no-sparse-array
Disallow sparse arrays
Examples
Section titled ExamplesInvalid
Section titled Invalid[1,,2]
suspicious/noSparseArray.js:1:1 lint/suspicious/noSparseArray FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ This array contains an empty slot.
> 1 │ [1,,2]
│ ^^^^^^
2 │
ℹ Unsafe fix: Replace hole with undefined
1 │ [1,·undefined,2]
│ ++++++++++