mirror of
https://github.com/nodejs/node.git
synced 2025-05-19 04:51:50 +00:00

PR-URL: https://github.com/nodejs/io.js/pull/2072 Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com> Reviewed-by: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Alex Kocharin <alex@kocharin.ru>
25 lines
545 B
JavaScript
25 lines
545 B
JavaScript
/**
|
|
* @fileoverview Rule to flag use of unary increment and decrement operators.
|
|
* @author Ian Christian Myers
|
|
*/
|
|
|
|
"use strict";
|
|
|
|
//------------------------------------------------------------------------------
|
|
// Rule Definition
|
|
//------------------------------------------------------------------------------
|
|
|
|
module.exports = function(context) {
|
|
|
|
return {
|
|
|
|
"UpdateExpression": function(node) {
|
|
context.report(node, "Unary operator '" + node.operator + "' used.");
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
module.exports.schema = [];
|