Sha256: 7e1c6b026ef045b30b323433729622a1fdf307edcc9aa055d1a723d52ff77d87
Contents?: true
Size: 764 Bytes
Versions: 2
Compression:
Stored size: 764 Bytes
Contents
/** * @fileoverview Rule to flag use of an object property of the global object (Math and JSON) as a function * @author James Allardice */ "use strict"; //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ module.exports = function(context) { return { "CallExpression": function(node) { if (node.callee.type === "Identifier") { var name = node.callee.name; if (name === "Math" || name === "JSON") { context.report(node, "'{{name}}' is not a function.", { name: name }); } } } }; }; 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-obj-calls.js |
eslint_node_modules-1.6.0 | vendor/node_modules/eslint/lib/rules/no-obj-calls.js |