Auto-formatting on nested-ternary causing catch 22

Viewed 16

I have prettier installed and using it with my eslint. Formatting on save with prettier is on and works.

But this ctrl+s is putting me in catch 22... enter image description here

enter image description here

I change it to make prettier happy, but something is changing it back upon saving.. enter image description here

I have tried to fidle with the setting in vsCode, like turn of this:

Insert Space After Keywords In Control Flow Statements

Had the same issue with a space in empty brackets, but fixed that by turning off this in vsCode settings:

Insert Space After Opening And Before Closing Empty Braces

Thought this was something simillar, but in this case I can't find a setting in vsCode and can't understand what is causing the auto formatting.

Anyone else faced this?

0 Answers
Related