noSparseArray
Diagnostic Category: lint/suspicious/noSparseArray
Since: v1.0.0
Sources:
- Same as: 
no-sparse-arrays 
Description
Section titled DescriptionDisallow sparse arrays
Examples
Section titled ExamplesInvalid
Section titled Invalid[1,,2]code-block.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]
      │    ++++++++++   
How to configure
Section titled How to configure{  "linter": {    "rules": {      "suspicious": {        "noSparseArray": "error"      }    }  }}