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