Sha256: 49fdf6978f2cb4193e8ac37fc38d25508d4bab79a8c3c033f8466a7a1bd8aa75
Contents?: true
Size: 621 Bytes
Versions: 2
Compression:
Stored size: 621 Bytes
Contents
/** * @fileoverview A rule to disallow calls to the Object constructor * @author Matt DuVall <http://www.mattduvall.com/> */ "use strict"; //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ module.exports = function(context) { return { "NewExpression": function(node) { if (node.callee.name === "Object") { context.report(node, "The object literal notation {} is preferrable."); } } }; }; module.exports.schema = [];
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
eslint_node_modules-1.6.0.1 | vendor/node_modules/eslint/lib/rules/no-new-object.js |
eslint_node_modules-1.6.0 | vendor/node_modules/eslint/lib/rules/no-new-object.js |