lib/rules/no-arrow-functions.js
function report(node, hasThis, hasSuper) {
            context.report({
                node,
                messageId: "forbidden",
                fix(fixer) {
                    if (hasSuper) {
                        return undefined
                    }
                    const functionText = toFunctionExpression(node)
                    return fixer.replaceText(
                        node,
                        hasThis ? `${functionText}.bind(this)` : functionText
                    )
                },
            })
        }
function report(node, hasThis, hasSuper) {
            context.report({
                node,
                messageId: "forbidden",
                fix(fixer) {
                    if (hasSuper) {
                        return undefined
                    }
                    const functionText = toFunctionExpression(node)
                    return fixer.replaceText(
                        node,
                        hasThis ? `${functionText}.bind(this)` : functionText
                    )
                },
            })
        }
function report ( node , hasThis , hasSuper ) { context . report ( { node , messageId : "forbidden" , fix ( fixer ) { if ( hasSuper ) { return undefined } const functionText = toFunctionExpression ( node ) return fixer . replaceText ( node , hasThis ? ` ${ functionText } ` : functionText ) } , } ) }
Report that ArrowFunctionExpression is being used
@param {Node} node ArrowFunctionExpression Node
@param {boolean} hasThis Whether `this` is referenced in` function` scope
@param {boolean} hasSuper Whether `super` is referenced in` function` scope
@returns {void}
Report that ArrowFunctionExpression is being used