charlike
Version:
Small, fast, simple and streaming project scaffolder for myself, but not only. Supports hundreds of template engines through the @JSTransformers API or if you want custom `render` function passed through options
33 lines (25 loc) • 696 B
JavaScript
/**
* @fileoverview Rule to flag use of a debugger statement
* @author Nicholas C. Zakas
*/
;
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
module.exports = {
meta: {
docs: {
description: "disallow the use of `debugger`",
category: "Possible Errors",
recommended: true
},
schema: []
},
create(context) {
return {
DebuggerStatement(node) {
context.report(node, "Unexpected 'debugger' statement.");
}
};
}
};