microsoft / TypeScript

TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
https://www.typescriptlang.org
Apache License 2.0
100.82k stars 12.46k forks source link

Indenter should indent binary operands more than their parent #923

Closed JsonFreeman closed 8 years ago

JsonFreeman commented 10 years ago

Indenter gives the following for binary expressions:

a = a &&
b;
c = c
&& d;

But it would be much nicer to have

a = a &&
    b;
c = c
    && d;

The previous indenter does not do this correctly either, but the Visual Studio JavaScript indenter does.

mhegazy commented 8 years ago

should work as expected now.