JS/TS indentation of 2nd and further line of if expression

Hi,

in Java, in IntelliJ IDEA I get by default indentation on 2nd line of continuous if expression is doubled and I like it this way:

if (i == 1 ||
i == 2) {
return true;
}

I am unable to achieve the same thing in JS/TS (IntelliJ IDEA, but I believe it's the same in WebStorm), I'm getting:

if (i == 1 ||
i == 2) {
return true;
}

Is there a configuration option for this, please?

Thanks,
A.

 

0
3 comments

No way to do this currently, please vote for https://youtrack.jetbrains.com/issue/WEB-32686 and linked tickets to be notified when it's fixed

0

I will, thank you

0

Oh, that's a ticket from 2012. It hasn't been implemented in 9 years, hardly going to change in the future :-(

0

Please sign in to leave a comment.