]>
git.proxmox.com Git - pve-eslint.git/blob - eslint/lib/rules/no-process-exit.js
29871660cc6ee14c5b6d8201dc921e501d2b07cc
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"
25 noProcessExit
: "Don't use process.exit(); throw an error instead."
31 //--------------------------------------------------------------------------
33 //--------------------------------------------------------------------------
36 "CallExpression > MemberExpression.callee[object.name = 'process'][property.name = 'exit']"(node
) {
37 context
.report({ node
: node
.parent
, messageId
: "noProcessExit" });