2 * @fileoverview Require spaces following return, throw, and case
3 * @author Michael Ficarra
7 //------------------------------------------------------------------------------
9 //------------------------------------------------------------------------------
11 module.exports = function(context) {
13 function check(node) {
14 var tokens = context.getFirstTokens(node, 2),
15 value = tokens[0].value;
17 if (tokens[0].range[1] >= tokens[1].range[0]) {
18 context.report(node, "Keyword \"" + value + "\" must be followed by whitespace.");
23 "ReturnStatement": function(node) {
28 "SwitchCase": function(node) {
33 "ThrowStatement": check