typescript-go icon indicating copy to clipboard operation
typescript-go copied to clipboard

Bad formatting of multiline ternary expression

Open mjbvz opened this issue 3 weeks ago • 0 comments

From https://github.com/microsoft/TypeScript/issues/14494 (original issue was actually fixed in 6, but regressed here)

Format the following code that uses tabs for indentation :

const test = (a: string) => (
	a === '1' ? (
		10
	) : (
		12
	)
)

Bug You get a mix of tabs and spaces:

const test = (a: string) => (
	a === '1' ? (
   10
	) : (
   12
	)
)

mjbvz avatar Dec 03 '25 21:12 mjbvz