CoolFace
Apppublic

Umama-at-Bluchip/Quick-UI

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
no-debugger.js44 linesDownload Raw Back to rules
1/**2 * @fileoverview Rule to flag use of a debugger statement3 * @author Nicholas C. Zakas4 */5 6"use strict";7 8//------------------------------------------------------------------------------9// Rule Definition10//------------------------------------------------------------------------------11 12/** @type {import('../shared/types').Rule} */13module.exports = {14    meta: {15        type: "problem",16 17        docs: {18            description: "Disallow the use of `debugger`",19            recommended: true,20            url: "https://eslint.org/docs/latest/rules/no-debugger"21        },22 23        fixable: null,24        schema: [],25 26        messages: {27            unexpected: "Unexpected 'debugger' statement."28        }29    },30 31    create(context) {32 33        return {34            DebuggerStatement(node) {35                context.report({36                    node,37                    messageId: "unexpected"38                });39            }40        };41 42    }43};44