Sha256: 488a8771940385ff2ff1554db834828cb5b0d935f09a5f814ce5de5e012f4d80
Contents?: true
Size: 645 Bytes
Versions: 2
Compression:
Stored size: 645 Bytes
Contents
/** * @fileoverview Rule to flag statements with function invocation preceded by * "new" and not part of assignment * @author Ilya Volodin */ "use strict"; //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ module.exports = function(context) { return { "ExpressionStatement": function(node) { if (node.expression.type === "NewExpression") { context.report(node, "Do not use 'new' for side effects."); } } }; }; 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-new.js |
eslint_node_modules-1.6.0 | vendor/node_modules/eslint/lib/rules/no-new.js |