<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="let obj = {
  foo: 'foo',
  bar: 'bar'
};
// outputs:
let obj = {
  foo: 'foo',
  bar: 'bar'
};"><pre class="notranslate"><span class="pl-k">let</span> <span class="pl-s1">obj</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
  <span class="pl-c1">foo</span>: <span class="pl-s">'foo'</span><span class="pl-kos">,</span>
  <span class="pl-c1">bar</span>: <span class="pl-s">'bar'</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-c">// outputs:</span>
<span class="pl-k">let</span> <span class="pl-s1">obj</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
  <span class="pl-c1">foo</span>: <span class="pl-s">'foo'</span><span class="pl-kos">,</span>
  <span class="pl-c1">bar</span>: <span class="pl-s">'bar'</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">but:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="let obj = {
  foo: 'foo',
  bar: 'bar',
};
// outputs:
let obj = {
  foo: 'foo',
  bar: 'bar' };"><pre class="notranslate"><span class="pl-k">let</span> <span class="pl-s1">obj</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
  <span class="pl-c1">foo</span>: <span class="pl-s">'foo'</span><span class="pl-kos">,</span>
  <span class="pl-c1">bar</span>: <span class="pl-s">'bar'</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-c">// outputs:</span>
<span class="pl-k">let</span> <span class="pl-s1">obj</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
  <span class="pl-c1">foo</span>: <span class="pl-s">'foo'</span><span class="pl-kos">,</span>
  <span class="pl-c1">bar</span>: <span class="pl-s">'bar'</span> <span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">This is a super critical high-priority bug, I'm super angry at you <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/sebmck/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/sebmck">@sebmck</a>. Why are you destroying my life? I hate you with every cell in my body and hope that you get hit by a bus. <img class="emoji" title=":trollface:" alt=":trollface:" src="https://github.githubassets.com/images/icons/emoji/trollface.png" height="20" width="20" align="absmiddle"></p>
<p dir="auto">Super low priority.</p>
<p dir="auto">This works as expected:<br>
Input:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var foo = {
  bar: true
}"><pre class="notranslate"><code class="notranslate">var foo = {
  bar: true
}
</code></pre></div>
<p dir="auto">Output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;use strict&quot;;

var foo = {
  bar: true
};"><pre class="notranslate"><code class="notranslate">"use strict";

var foo = {
  bar: true
};
</code></pre></div>
<p dir="auto">However, adding a trailing comma makes the last linebreak disappear:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var foo = {
  bar: true,
}"><pre class="notranslate"><code class="notranslate">var foo = {
  bar: true,
}
</code></pre></div>
<p dir="auto">Output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;use strict&quot;;

var foo = {
  bar: true };"><pre class="notranslate"><code class="notranslate">"use strict";

var foo = {
  bar: true };
</code></pre></div>
<p dir="auto">REPL: <a href="http://babeljs.io/repl/#?experimental=true&amp;evaluate=true&amp;loose=true&amp;spec=false&amp;playground=true&amp;code=var%20foo%20%3D%20%7B%0A%20%20bar%3A%20true%2C%0A%7D" rel="nofollow">http://babeljs.io/repl/#?experimental=true&amp;evaluate=true&amp;loose=true&amp;spec=false&amp;playground=true&amp;code=var%20foo%20%3D%20%7B%0A%20%20bar%3A%20true%2C%0A%7D</a></p>