How can i force Visual Studio to maintain curly braces in the same line when auto format is done?
Example: I write this code:
$('#details-modal').on('change', '#Foo1', function (e) {
var bar = $('#Foo2 option:selected').text();
})
When i add ; the code gets formatted like this:
$('#details-modal').on('change',
'#Foo1',
function (e) {
var bar = $('#Foo2 option:selected').text();
});
How can i avoid this behaviour and maintain the first code style?
Thank you
I post this in case anyone has the same problem.
In my case, it was not visual studio 2022 the tool which was causing the line breaks, it was Resharper.
I have disabled the wrapping options in Javascript inside Resharper and now it is working as desired.