Sha256: 4196c2caa322a05f2608485d8c288dd9b28fa53d8195b16736207e9882d530cf
Contents?: true
Size: 784 Bytes
Versions: 2
Compression:
Stored size: 784 Bytes
Contents
/** * @fileoverview Rule to flag usage of __iterator__ property * @author Ian Christian Myers */ "use strict"; //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ module.exports = function(context) { return { "MemberExpression": function(node) { if (node.property && (node.property.type === "Identifier" && node.property.name === "__iterator__" && !node.computed) || (node.property.type === "Literal" && node.property.value === "__iterator__")) { context.report(node, "Reserved name '__iterator__'."); } } }; }; 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-iterator.js |
eslint_node_modules-1.6.0 | vendor/node_modules/eslint/lib/rules/no-iterator.js |