Sha256: d93d7732940803596b2c75281d76d9a1435dbd73ea557429364bee51f7a743f8

Contents?: true

Size: 778 Bytes

Versions: 2

Compression:

Stored size: 778 Bytes

Contents

/**
 * @fileoverview Rule to flag usage of __proto__ property
 * @author Ilya Volodin
 */

"use strict";

//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------

module.exports = function(context) {

    return {

        "MemberExpression": function(node) {

            if (node.property &&
                    (node.property.type === "Identifier" && node.property.name === "__proto__" && !node.computed) ||
                    (node.property.type === "Literal" && node.property.value === "__proto__")) {
                context.report(node, "The '__proto__' property is deprecated.");
            }
        }
    };

};

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-proto.js
eslint_node_modules-1.6.0 vendor/node_modules/eslint/lib/rules/no-proto.js