1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- "use strict";
- module.exports = {
- meta: {
- deprecated: true,
- replacedBy: [],
- type: "suggestion",
- docs: {
- description: "Disallow the use of `process.exit()`",
- recommended: false,
- url: "https://eslint.org/docs/latest/rules/no-process-exit"
- },
- schema: [],
- messages: {
- noProcessExit: "Don't use process.exit(); throw an error instead."
- }
- },
- create(context) {
-
-
-
- return {
- "CallExpression > MemberExpression.callee[object.name = 'process'][property.name = 'exit']"(node) {
- context.report({ node: node.parent, messageId: "noProcessExit" });
- }
- };
- }
- };
|