UNPKG

520 BJavaScriptView Raw
1/**
2 * @fileoverview Rule to flag use of unary increment and decrement operators.
3 * @author Ian Christian Myers
4 */
5
6//------------------------------------------------------------------------------
7// Rule Definition
8//------------------------------------------------------------------------------
9
10module.exports = function(context) {
11
12 "use strict";
13
14 return {
15
16 "UpdateExpression": function(node) {
17 context.report(node, "Unary operator '" + node.operator + "' used.");
18 }
19
20 };
21
22};