2 * @fileoverview Disallow sparse arrays
3 * @author Nicholas C. Zakas
7 //------------------------------------------------------------------------------
9 //------------------------------------------------------------------------------
11 module.exports = function(context) {
14 //--------------------------------------------------------------------------
16 //--------------------------------------------------------------------------
20 "ArrayExpression": function(node) {
22 var emptySpot = node.elements.indexOf(null) > -1;
25 context.report(node, "Unexpected comma in middle of array.");