]>
git.proxmox.com Git - pve-eslint.git/blob - eslint/lib/rules/no-caller.js
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`",
19 url
: "https://eslint.org/docs/rules/no-caller"
25 unexpected
: "Avoid arguments.{{prop}}."
33 MemberExpression(node
) {
34 const objectName
= node
.object
.name
,
35 propertyName
= node
.property
.name
;
37 if (objectName
=== "arguments" && !node
.computed
&& propertyName
&& propertyName
.match(/^calle[er]$/u)) {
38 context
.report({ node
, messageId
: "unexpected", data
: { prop
: propertyName
} });