title: babeljs throwing 'unterminated regular expression' in </type> of renderDetails() method
body: <p>I am trying to write small piece of ES6 React code and compiling it using Babel. I get this error of 'unterminated regular expression'. No clue why this is happening. Needs help.</p>
  
  <pre><code>class List extends React.createClass {
    getInitialState() {
      return {
        showList: this.props.showList,
        listType: this.props.type
      }
    }
  
    getDefaultProps() {
      return {
        showList: true,
        type    : "ul"
      }
    }
  
    propTypes: {
      type: React.PropTypes.string;
    }
  
    renderDetails() {
      var showList = this.state.showList,
          type = this.props.type;
  
      if (showList) {
        return
          &lt;type&gt;
            {this.props.items.map(function(item) {
              return &lt;li key={item.id}&gt;{item.value}&lt;/li&gt;
            })
          &lt;/type&gt;
      }
      else {
        return null;
      }
    }
  
    render() {
      return (
        {this.renderDetails.bind(this)}
      );
    }
  };
  
  React.render(&lt;List type="ul" items={items} /&gt;, document.body);
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/bWpyg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bWpyg.png" alt="Error snapshot"></a></p>