2 * @fileoverview Disallow the use of process.exit()
3 * @author Nicholas C. Zakas
7 //------------------------------------------------------------------------------
9 //------------------------------------------------------------------------------
16 description: "disallow the use of `process.exit()`",
17 category: "Node.js and CommonJS",
19 url: "https://eslint.org/docs/rules/no-process-exit"
27 //--------------------------------------------------------------------------
29 //--------------------------------------------------------------------------
32 "CallExpression > MemberExpression.callee[object.name = 'process'][property.name = 'exit']"(node) {
33 context.report({ node: node.parent, message: "Don't use process.exit(); throw an error instead." });