Subject: bug#76704: 30.1; Indentation of braces on separate line in js-ts-mode

From: Fabian Brosda <[email-masked]>
Date: Wed, 02 Apr 2025 10:51:05 +0200

Hi Vincenzo,

> For switch body indentation now possible to use js-switch-indent-offset as in
> js-mode.

Testing this, the results are different in js-mode and js-ts-mode.  js-mode
applies the offset only if the brace is on the same line, while
js-ts-mode applies it only, if the brace is on a separate line.  I
updated the gist, and used js-switch-indent-offset = 2, to distinguish
it from the regular indentation.

> Can you please try it again?

I also tested in a couple of projects and found one difference when
using ternary operators and putting the whole expression in parenthesis.
I also added it to the gist.  Note, that only the combination of
parenthesis and ternary operator is different, the other two cases are
the same.

But otherwise I could not find any more differences and the original
case with braces on separate lines also works very well :-)

Fabian