Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

150
Views
Visual Studio 2022 place curly braces in the same line in javascript

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

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

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.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!