function parens(node){var token=sourceCode.getFirstToken(node,node.async?1:0);// "as-needed", { "requireForBlockBody": true }: x => x
if(requireForBlockBody&&node.params.length===1&&node.params[0].type==="Identifier"&&!node.params[0].typeAnnotation&&node.body.type!=="BlockStatement"&&!node.returnType){if(astUtils.isOpeningParenToken(token)){context.report({node:node,message:requireForBlockBodyMessage,fix:function fix(fixer){var paramToken=context.getTokenAfter(token);var closingParenToken=context.getTokenAfter(paramToken);return fixer.replaceTextRange([token.range[0],closingParenToken.range[1]],paramToken.value);}});}return;}if(requireForBlockBody&&node.body.type==="BlockStatement"){if(!astUtils.isOpeningParenToken(token)){context.report({node:node,message:requireForBlockBodyNoParensMessage,fix:function fix(fixer){return fixer.replaceText(token,"("+token.value+")");}});}return;}// "as-needed": x => x
if(asNeeded&&node.params.length===1&&node.params[0].type==="Identifier"&&!node.params[0].typeAnnotation&&!node.returnType){if(astUtils.isOpeningParenToken(token)){context.report({node:node,message:asNeededMessage,fix:function fix(fixer){var paramToken=context.getTokenAfter(token);var closingParenToken=context.getTokenAfter(paramToken);return fixer.replaceTextRange([token.range[0],closingParenToken.range[1]],paramToken.value);}});}return;}if(token.type==="Identifier"){var after=sourceCode.getTokenAfter(token);// (x) => x
if(after.value!==")"){context.report({node:node,message:message,fix:function fix(fixer){return fixer.replaceText(token,"("+token.value+")");}});}}}
Determines whether a arrow function argument end with `)`
@param {ASTNode} node The arrow function node.
@returns {void}