Ohm-Management - Projektarbeit B-ME
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-debugger.js 947B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /**
  2. * @fileoverview Rule to flag use of a debugger statement
  3. * @author Nicholas C. Zakas
  4. */
  5. "use strict";
  6. //------------------------------------------------------------------------------
  7. // Rule Definition
  8. //------------------------------------------------------------------------------
  9. module.exports = {
  10. meta: {
  11. type: "problem",
  12. docs: {
  13. description: "disallow the use of `debugger`",
  14. category: "Possible Errors",
  15. recommended: true,
  16. url: "https://eslint.org/docs/rules/no-debugger"
  17. },
  18. fixable: null,
  19. schema: [],
  20. messages: {
  21. unexpected: "Unexpected 'debugger' statement."
  22. }
  23. },
  24. create(context) {
  25. return {
  26. DebuggerStatement(node) {
  27. context.report({
  28. node,
  29. messageId: "unexpected"
  30. });
  31. }
  32. };
  33. }
  34. };