<p dir="auto">Compiling the following code:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&quot;use strict&quot;;
export default class {};"><pre class="notranslate"><span class="pl-s">"use strict"</span><span class="pl-kos">;</span>
<span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-k">class</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Using the command line <code class="notranslate">tsc --t es6 --m commonjs</code> produces illegal JavaScript:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&quot;use strict&quot;;
class {
}
exports.default = default_1
;"><pre class="notranslate"><span class="pl-s">"use strict"</span><span class="pl-kos">;</span>
<span class="pl-k">class</span> <span class="pl-kos">{</span>
<span class="pl-kos">}</span>
<span class="pl-s1">exports</span><span class="pl-kos">.</span><span class="pl-c1">default</span> <span class="pl-c1">=</span> <span class="pl-s1">default_1</span>
<span class="pl-kos">;</span></pre></div>
<p dir="auto">I realize this is a weird combination of switches, however it seems necessary to target current versions of Node.js/V8 that don't yet natively support ES6 modules.</p>
<p dir="auto">Reported by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/kuon/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/kuon">@kuon</a> in:<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="86226862" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript-Sublime-Plugin/issues/220" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript-Sublime-Plugin/issues/220/hovercard" href="https://github.com/microsoft/TypeScript-Sublime-Plugin/issues/220">microsoft/TypeScript-Sublime-Plugin#220</a></p>
<p dir="auto">When I use autoformat, the following block get the following indentation:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="toolsElement = h.div({ className: &quot;row-tools&quot; },
    h.button({
        className: &quot;add-node&quot;,
        onClick: () =&gt; DataController.createNode(this.props.parentId)
    }, &quot;Create new node&quot;)
    );"><pre class="notranslate"><code class="notranslate">toolsElement = h.div({ className: "row-tools" },
    h.button({
        className: "add-node",
        onClick: () =&gt; DataController.createNode(this.props.parentId)
    }, "Create new node")
    );
</code></pre></div>
<p dir="auto">While I expect (Last line should be to the left):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="toolsElement = h.div({ className: &quot;row-tools&quot; },
    h.button({
        className: &quot;add-node&quot;,
        onClick: () =&gt; DataController.createNode(this.props.parentId)
    }, &quot;Create new node&quot;)
);"><pre class="notranslate"><code class="notranslate">toolsElement = h.div({ className: "row-tools" },
    h.button({
        className: "add-node",
        onClick: () =&gt; DataController.createNode(this.props.parentId)
    }, "Create new node")
);
</code></pre></div>
<p dir="auto">Another example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="return (
    h.div({
        className: &quot;view-node-row&quot;,
        style: {
            width: width,
            height: rowHeight
        }
    },
        backgroundElement,
        centerElement,
        toolsElement,
        h.div({ className: &quot;nodes&quot; }, items)
        )
    );"><pre class="notranslate"><code class="notranslate">return (
    h.div({
        className: "view-node-row",
        style: {
            width: width,
            height: rowHeight
        }
    },
        backgroundElement,
        centerElement,
        toolsElement,
        h.div({ className: "nodes" }, items)
        )
    );
</code></pre></div>
<p dir="auto">While I expect:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="return (
    h.div({
        className: &quot;view-node-row&quot;,
        style: {
            width: width,
            height: rowHeight
        }
    },
    backgroundElement,
    centerElement,
    toolsElement,
    h.div({ className: &quot;nodes&quot; }, items)
    )
);"><pre class="notranslate"><code class="notranslate">return (
    h.div({
        className: "view-node-row",
        style: {
            width: width,
            height: rowHeight
        }
    },
    backgroundElement,
    centerElement,
    toolsElement,
    h.div({ className: "nodes" }, items)
    )
);
</code></pre></div>
<p dir="auto">PS: I'm doing react without JSX because TypeScript &gt; JSX, but proper indentation is really crucial to readability.</p>