eslint/eslint — pull request #1491 by btmills (2014-11-24 08:10:31+00:00)
Title: Fix: crash in no-multi-spaces on empty array elements (fixes #1418)

Part of this is refactoring to clean up some unnecessary state and repetitive code. The interesting part, however, is the new `checkArray` method. It is designed to handle possibly-empty elements, so it detects the error in the second case below, even though everything except the second comma is in the same place.

```
[1, , 3]; // Valid
[1, ,3]; // Invalid
```

With a little bit more effort, I could generalize `checkArray` to be able to replace `checkList` entirely, but I haven't yet because the logic for allowing empty elements does make it much more complex. I also noticed that the more general `checkList` doesn't check for multiple spaces at the beginning or end of lists, but `checkArray` does:

```
({ hello: world }); // Valid (incorrectly?)
([ hello, world ]); // Invalid
```