lib/rules/no-var.js
function report(node) {
            context.report({
                node,
                message: "Unexpected var, use let or const instead.",

                fix(fixer) {
                    const varToken = sourceCode.getFirstToken(node, { filter: t => t.value === "var" });

                    return canFix(node)
                        ? fixer.replaceText(varToken, "let")
                        : null;
                }
            });
        }
function report(node) {
            context.report({
                node,
                message: "Unexpected var, use let or const instead.",

                fix(fixer) {
                    const varToken = sourceCode.getFirstToken(node, { filter: t => t.value === "var" });

                    return canFix(node)
                        ? fixer.replaceText(varToken, "let")
                        : null;
                }
            });
        }
function report ( node ) { context . report ( { node , message : "Unexpected var, use let or const instead." , fix ( fixer ) { const varToken = sourceCode . getFirstToken ( node , { filter : t => t . value === "var" } ) ; return canFix ( node ) ? fixer . replaceText ( varToken , "let" ) : null ; } } ) ; }
Reports a given variable declaration node.

@param {ASTNode} node - A variable declaration node to report.
@returns {void}
Reports a given variable declaration node .