lib/rules/space-in-parens.js
function shouldCloserHaveSpace( left, right ) {
      if ( astUtils.isOpeningParenToken( left ) ) {
        return false;
      }

      if ( sourceCode.isSpaceBetweenTokens( left, right ) ) {
        return false;
      }

      if ( ALWAYS ) {
        return !isCloserException( left );
      }
      return isCloserException( left );
    }
function shouldCloserHaveSpace( left, right ) {
      if ( astUtils.isOpeningParenToken( left ) ) {
        return false;
      }

      if ( sourceCode.isSpaceBetweenTokens( left, right ) ) {
        return false;
      }

      if ( ALWAYS ) {
        return !isCloserException( left );
      }
      return isCloserException( left );
    }
Determines if an closer paren should have a missing space after it
@param {Object} left The token before the paren
@param {Object} right The paren token
@returns {boolean} True if the paren should have a space