Sha256: e3b2f063fa207e172e7f79a8a76ca5dc5c25b62e5ac6728d3ae1bb2cc4ee4ded

Contents?: true

Size: 672 Bytes

Versions: 2

Compression:

Stored size: 672 Bytes

Contents

/**
 * @fileoverview Rule to flag use of eval() statement
 * @author Nicholas C. Zakas
 * @copyright 2015 Mathias Schreck. All rights reserved.
 * @copyright 2013 Nicholas C. Zakas. All rights reserved.
 */

"use strict";

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

module.exports = function(context) {

    return {
        "CallExpression": function(node) {
            if (node.callee.name === "eval") {
                context.report(node, "eval can be harmful.");
            }
        }
    };

};

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