]>
git.proxmox.com Git - pve-eslint.git/blob - eslint/lib/rules/no-proto.js
e6659e59c6bc274288b9b51c5d9940e348ce5606
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/rules/no-proto"
32 unexpectedProto
: "The '__proto__' property is deprecated."
40 MemberExpression(node
) {
41 if (getStaticPropertyName(node
) === "__proto__") {
42 context
.report({ node
, messageId
: "unexpectedProto" });