Rule: no-sparse-arrays

Forbids array literals to contain missing elements.

Rationale

Missing elements are probably an accidentally duplicated comma.

Config

Not configurable.

Config examples
"no-sparse-arrays": true
Schema
null

Code examples:

Disallows sparse arrays
"rules": { "no-sparse-arrays": true }
Passes
const arr: string[] = ['elemenet1', 'element2'];
Fails
const arr: string[] = ['elemenet1',, 'element2'];