function checkArrowFunc(node) {
            const body = node.body;

            if (isConditional(body) && !(allowParens && astUtils.isParenthesised(sourceCode, body))) {
                context.report({
                    node,
                    messageId: "confusing",
                    fix(fixer) {

                        // if `allowParens` is not set to true dont bother wrapping in parens
                        return allowParens && fixer.replaceText(node.body, `(${sourceCode.getText(node.body)})`);
                    }
                });
            }
        }
function checkArrowFunc(node) {
            const body = node.body;

            if (isConditional(body) && !(allowParens && astUtils.isParenthesised(sourceCode, body))) {
                context.report({
                    node,
                    messageId: "confusing",
                    fix(fixer) {

                        // if `allowParens` is not set to true dont bother wrapping in parens
                        return allowParens && fixer.replaceText(node.body, `(${sourceCode.getText(node.body)})`);
                    }
                });
            }
        }
function checkArrowFunc ( node ) { const body = node . body ; if ( isConditional ( body ) && ! ( allowParens && astUtils . isParenthesised ( sourceCode , body ) ) ) { context . report ( { node , messageId : "confusing" , fix ( fixer ) { // if `allowParens` is not set to true dont bother wrapping in parens return allowParens && fixer . replaceText ( node . body , ` ${ sourceCode . getText ( node . body ) } ` ) ; } } ) ; } }
Reports if an arrow function contains an ambiguous conditional.
@param {ASTNode} node - A node to check and report.
@returns {void}
Reports if an arrow function contains an ambiguous conditional .
Check if the arrow function is confusing