function spaces(node){var tokens=getTokens(node);var countSpace=countSpaces(tokens);if(rule.before){// should be space(s) before arrow
if(countSpace.before===0){context.report({node:tokens.before,message:"Missing space before =>.",fix:function fix(fixer){return fixer.insertTextBefore(tokens.arrow," ");}});}}else{// should be no space before arrow
if(countSpace.before>0){context.report({node:tokens.before,message:"Unexpected space before =>.",fix:function fix(fixer){return fixer.removeRange([tokens.before.range[1],tokens.arrow.range[0]]);}});}}if(rule.after){// should be space(s) after arrow
if(countSpace.after===0){context.report({node:tokens.after,message:"Missing space after =>.",fix:function fix(fixer){return fixer.insertTextAfter(tokens.arrow," ");}});}}else{// should be no space after arrow
if(countSpace.after>0){context.report({node:tokens.after,message:"Unexpected space after =>.",fix:function fix(fixer){return fixer.removeRange([tokens.arrow.range[1],tokens.after.range[0]]);}});}}}
Determines whether space(s) before after arrow(`=>`) is satisfy rule.
if before/after value is `true`, there should be space(s).
if before/after value is `false`, there should be no space.
@param {ASTNode} node The arrow function node.
@returns {void}