2 * @fileoverview Rule to flag usage of __proto__ property
8 //------------------------------------------------------------------------------
10 //------------------------------------------------------------------------------
12 const { getStaticPropertyName } = require("./utils/ast-utils");
14 //------------------------------------------------------------------------------
16 //------------------------------------------------------------------------------
23 description: "disallow the use of the `__proto__` property",
24 category: "Best Practices",
26 url: "https://eslint.org/docs/rules/no-proto"
32 unexpectedProto: "The '__proto__' property is deprecated."
40 MemberExpression(node) {
41 if (getStaticPropertyName(node) === "__proto__") {
42 context.report({ node, messageId: "unexpectedProto" });