noSparseArray (since v0.7.0)
This rule is recommended by Rome.
Disallow sparse arrays
Examples
Invalid
[1,,2]
suspicious/noSparseArray.js:1:1 lint/suspicious/noSparseArray FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ This array contains an empty slot.
> 1 │ [1,,2]
│ ^^^^^^
2 │
ℹ Suggested fix: Replace hole with undefined
1 │ [1,·undefined,2]
│ ++++++++++