title: es6 javascript recommend way to apply template literal with ternary operator?
body: <p>I am using eslint in my development with airbnb style guide. I am getting eslint error suggest using template literals instead of string concatenation (prefer-template).</p>
  
  <p>It flags this line with error</p>
  
  <p><code>':&lt;br&gt;&lt;br&gt;&lt;pre style="color:red"&gt;' + softTab + err.stack.replace(/\n/g, '&lt;br&gt;' + softTab) + '&lt;/pre&gt;' : '';</code> </p>
  
  <p>here is my code</p>
  
  <pre><code>const renderError = err =&gt; {
    const softTab = '&amp;#32;&amp;#32;&amp;#32;&amp;#32;';
    const errTrace = process.env.NODE_ENV !== 'production' ?
      ':&lt;br&gt;&lt;br&gt;&lt;pre style="color:red"&gt;' + softTab + err.stack.replace(/\n/g, '&lt;br&gt;' + softTab) + '&lt;/pre&gt;' : '';
    return renderFullPage(`Server Error${errTrace}`, {});
  };
  </code></pre>
  
  <p>My question is what is the recommend way to apply a template literal using ternary operator? I applied it on the function return but depending on where I apply the template literal on this line causes errors. Ideally I tried doing this whole line but I get a problem with with trying to pass <code>${softTab}</code> to the <code>err.stack.replace(/\n/g, '&lt;br&gt;' + softTab)</code>any suggestions or solutions would be great. Thanks!</p>