function checkFunction(node) {
            const parent = node.parent;

            if (parent.type === "CallExpression") {
                callbackStack.push(node);
            }

            if (callbackStack.length > THRESHOLD) {
                const opts = { num: callbackStack.length, max: THRESHOLD };

                context.report({ node, messageId: "exceed", data: opts });
            }
        }
function checkFunction(node) {
            const parent = node.parent;

            if (parent.type === "CallExpression") {
                callbackStack.push(node);
            }

            if (callbackStack.length > THRESHOLD) {
                const opts = { num: callbackStack.length, max: THRESHOLD };

                context.report({ node, messageId: "exceed", data: opts });
            }
        }
function checkFunction ( node ) { const parent = node . parent ; if ( parent . type === "CallExpression" ) { callbackStack . push ( node ) ; } if ( callbackStack . length > THRESHOLD ) { const opts = { num : callbackStack . length , max : THRESHOLD } ; context . report ( { node , messageId : "exceed" , data : opts } ) ; } }
Checks a given function node for too many callbacks.
@param {ASTNode} node The node to check.
@returns {void}
@private
Checks a given function node for too many callbacks .
Check if a function is a call