Sha256: 5db8786e55eac414b8d1e7ccd17a1b97fc4aa61a53dd9094b7e6ca2ac54dbdc1
Contents?: true
Size: 788 Bytes
Versions: 2
Compression:
Stored size: 788 Bytes
Contents
/** * @fileoverview Rule to flag use of arguments.callee and arguments.caller. * @author Nicholas C. Zakas */ "use strict"; //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ module.exports = function(context) { return { "MemberExpression": function(node) { var objectName = node.object.name, propertyName = node.property.name; if (objectName === "arguments" && !node.computed && propertyName && propertyName.match(/^calle[er]$/)) { context.report(node, "Avoid arguments.{{property}}.", { property: propertyName }); } } }; }; 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-caller.js |
eslint_node_modules-1.6.0 | vendor/node_modules/eslint/lib/rules/no-caller.js |