lib/rules/no-trailing-underscore.js
/**
     * Check if member expression has a underscore at the end
     *
     * @param {ASTNode} node node to evaluate
     * @returns {void}
     * @private
     */
Check if member expression has a underscore at the end
@param {ASTNode} node node to evaluate
@returns {void}
@private
Check if member expression has a underscore at the end @param { ASTNode } node node to evaluate @returns { void } @private
function checkForTrailingUnderscoreInMemberExpression(node) {
      var identifier = node.property.name;
      var isMemberOfThis = node.object.type === 'ThisExpression';
      var isMemberOfSuper = node.object.type === 'Super';
      if (
        typeof identifier !== 'undefined' &&
        hasTrailingUnderscore(identifier) &&
        !(isMemberOfThis && allowAfterThis) &&
        !(isMemberOfSuper && allowAfterSuper) &&
        !isSpecialCaseIdentifierForMemberExpression(identifier) &&
        !isAllowed(identifier)
      ) {
        context.report({
          data: {
            identifier,
          },
          message: "Unexpected trailing '_' in '{{identifier}}'.",
          node,
        });
      }
    }
function checkForTrailingUnderscoreInMemberExpression ( node ) { var identifier = node . property . name ; var isMemberOfThis = node . object . type === 'ThisExpression' ; var isMemberOfSuper = node . object . type === 'Super' ; if ( typeof identifier !== 'undefined' && hasTrailingUnderscore ( identifier ) && ! ( isMemberOfThis && allowAfterThis ) && ! ( isMemberOfSuper && allowAfterSuper ) && ! isSpecialCaseIdentifierForMemberExpression ( identifier ) && ! isAllowed ( identifier ) ) { context . report ( { data : { identifier , } , message : "Unexpected trailing '_' in '{{identifier}}'." , node , } ) ; } }
Check if member expression has a underscore at the end
 @param {ASTNode} node node to evaluate
 @returns {void}
 @private
Check if member expression has a underscore at the end @param { ASTNode } node node to evaluate @returns { void } @private