]>
git.proxmox.com Git - pve-eslint.git/blob - eslint/lib/rules/no-proto.js
28320d5d5e5f1d7f041b57cea47ec131932337ad
2 * @fileoverview Rule to flag usage of __proto__ property
8 //------------------------------------------------------------------------------
10 //------------------------------------------------------------------------------
12 const { getStaticPropertyName
} = require("./utils/ast-utils");
14 //------------------------------------------------------------------------------
16 //------------------------------------------------------------------------------
18 /** @type {import('../shared/types').Rule} */
24 description
: "Disallow the use of the `__proto__` property",
26 url
: "https://eslint.org/docs/latest/rules/no-proto"
32 unexpectedProto
: "The '__proto__' property is deprecated."
40 MemberExpression(node
) {
41 if (getStaticPropertyName(node
) === "__proto__") {
42 context
.report({ node
, messageId
: "unexpectedProto" });