2 * @fileoverview Disallow construction of dense arrays using the Array constructor
3 * @author Matt DuVall <http://www.mattduvall.com/>
8 //------------------------------------------------------------------------------
10 //------------------------------------------------------------------------------
12 module.exports = function(context) {
14 function check(node) {
16 node.arguments.length !== 1 &&
17 node.callee.type === "Identifier" &&
18 node.callee.name === "Array"
20 context.report(node, "The array literal notation [] is preferrable.");
25 "CallExpression": check,
26 "NewExpression": check