Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 

40 строки
919 B

  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. docs: {
  12. description: "disallow the use of `debugger`",
  13. category: "Possible Errors",
  14. recommended: true,
  15. url: "https://eslint.org/docs/rules/no-debugger"
  16. },
  17. fixable: null,
  18. schema: [],
  19. messages: {
  20. unexpected: "Unexpected 'debugger' statement."
  21. }
  22. },
  23. create(context) {
  24. return {
  25. DebuggerStatement(node) {
  26. context.report({
  27. node,
  28. messageId: "unexpected"
  29. });
  30. }
  31. };
  32. }
  33. };