2 * @fileoverview Rule to flag use of an object property of the global object (Math and JSON) as a function
3 * @author James Allardice
8 //------------------------------------------------------------------------------
10 //------------------------------------------------------------------------------
12 module.exports = function(context) {
15 "CallExpression": function(node) {
17 if (node.callee.type === "Identifier") {
18 var name = node.callee.name;
19 if (name === "Math" || name === "JSON") {
20 context.report(node, "'{{name}}' is not a function.", { name: name });