lib/rules/no-self-assign.js
function isSameProperty(left, right) {
    if (left.property.type === "Identifier" &&
        left.property.type === right.property.type &&
        left.property.name === right.property.name &&
        left.computed === right.computed
    ) {
        return true;
    }

    const lname = astUtils.getStaticPropertyName(left);
    const rname = astUtils.getStaticPropertyName(right);

    return lname !== null && lname === rname;
}
function isSameProperty(left, right) {
    if (left.property.type === "Identifier" &&
        left.property.type === right.property.type &&
        left.property.name === right.property.name &&
        left.computed === right.computed
    ) {
        return true;
    }

    const lname = astUtils.getStaticPropertyName(left);
    const rname = astUtils.getStaticPropertyName(right);

    return lname !== null && lname === rname;
}
function isSameProperty ( left , right ) { if ( left . property . type === "Identifier" && left . property . type === right . property . type && left . property . name === right . property . name && left . computed === right . computed ) { return true ; } const lname = astUtils . getStaticPropertyName ( left ) ; const rname = astUtils . getStaticPropertyName ( right ) ; return lname !== null && lname === rname ; }
Checks whether the property of 2 given member expression nodes are the same
property or not.

@param {ASTNode} left - A member expression node to check.
@param {ASTNode} right - Another member expression node to check.
@returns {boolean} `true` if the member expressions have the same property.
Checks whether the property of 2 given member expression nodes are the same property or not .