UNPKG

571 BJavaScriptView Raw
1/**
2 * @fileoverview Rule to flag use of console object
3 * @author Nicholas C. Zakas
4 */
5
6"use strict";
7
8//------------------------------------------------------------------------------
9// Rule Definition
10//------------------------------------------------------------------------------
11
12module.exports = function(context) {
13
14 return {
15
16 "MemberExpression": function(node) {
17
18 if (node.object.name === "console") {
19 context.report(node, "Unexpected console statement.");
20 }
21
22 }
23 };
24
25};
26
27module.exports.schema = [];