2 * @fileoverview Rule to flag use of arguments.callee and arguments.caller.
3 * @author Nicholas C. Zakas
8 //------------------------------------------------------------------------------
10 //------------------------------------------------------------------------------
17 description: "disallow the use of `arguments.caller` or `arguments.callee`",
18 category: "Best Practices",
20 url: "https://eslint.org/docs/rules/no-caller"
26 unexpected: "Avoid arguments.{{prop}}."
34 MemberExpression(node) {
35 const objectName = node.object.name,
36 propertyName = node.property.name;
38 if (objectName === "arguments" && !node.computed && propertyName && propertyName.match(/^calle[er]$/u)) {
39 context.report({ node, messageId: "unexpected", data: { prop: propertyName } });