Sha256: 2daf5d6d4740c9a87b449c32da6cf190939d8b9b4b8f954f08c8af32b1aba74b
Contents?: true
Size: 907 Bytes
Versions: 2
Compression:
Stored size: 907 Bytes
Contents
/** * @fileoverview Disallow the use of process.exit() * @author Nicholas C. Zakas */ "use strict"; //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ module.exports = function(context) { //-------------------------------------------------------------------------- // Public //-------------------------------------------------------------------------- return { "CallExpression": function(node) { var callee = node.callee; if (callee.type === "MemberExpression" && callee.object.name === "process" && callee.property.name === "exit" ) { context.report(node, "Don't use process.exit(); throw an error instead."); } } }; }; 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-process-exit.js |
eslint_node_modules-1.6.0 | vendor/node_modules/eslint/lib/rules/no-process-exit.js |