2 * @fileoverview Rule to flag usage of __iterator__ property
3 * @author Ian Christian Myers
8 //------------------------------------------------------------------------------
10 //------------------------------------------------------------------------------
17 description: "disallow the use of the `__iterator__` property",
18 category: "Best Practices",
20 url: "https://eslint.org/docs/rules/no-iterator"
30 MemberExpression(node) {
33 (node.property.type === "Identifier" && node.property.name === "__iterator__" && !node.computed) ||
34 (node.property.type === "Literal" && node.property.value === "__iterator__")) {
35 context.report({ node, message: "Reserved name '__iterator__'." });