Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

no-process-exit.js 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /**
  2. * @fileoverview Disallow the use of process.exit()
  3. * @author Nicholas C. Zakas
  4. */
  5. "use strict";
  6. //------------------------------------------------------------------------------
  7. // Rule Definition
  8. //------------------------------------------------------------------------------
  9. module.exports = {
  10. meta: {
  11. deprecated: true,
  12. replacedBy: [],
  13. type: "suggestion",
  14. docs: {
  15. description: "disallow the use of `process.exit()`",
  16. category: "Node.js and CommonJS",
  17. recommended: false,
  18. url: "https://eslint.org/docs/rules/no-process-exit"
  19. },
  20. schema: [],
  21. messages: {
  22. noProcessExit: "Don't use process.exit(); throw an error instead."
  23. }
  24. },
  25. create(context) {
  26. //--------------------------------------------------------------------------
  27. // Public
  28. //--------------------------------------------------------------------------
  29. return {
  30. "CallExpression > MemberExpression.callee[object.name = 'process'][property.name = 'exit']"(node) {
  31. context.report({ node: node.parent, messageId: "noProcessExit" });
  32. }
  33. };
  34. }
  35. };