2

How can I stop Visual Studio 2017 from all JavaScript formatting? Under Options/JavaScript/TypeScript I have turned off every language formatting option (e..g, Format completed line on ...); I turned off ESLint; I turned off the Language Service.

Still, on carriage returns, on paste, and on statement completion, VS re-formats blocks of my code.

Please note that this question has not solved the problem, so I am looking for other ideas.

Is there a way to turn this off completely?

Thanks!

  • 1
    Check the linked question. It's the same process as Visual Studio 2015. – Mike Cluck May 24 '17 at 16:43
  • @MikeC The question referred to is neither an exact duplicate nor a solution to the problem. This question asks specifically for JavaScript formatting in VS2017. The other question asks about code formatting in general in VS2008, and its answers are about Visual Basic's "pretty listing", about Resharper's settings, about Power Tools, etc. but not about the apparently unconfigurable JavaScript formatting in VS2017. Could this question be reopened? – Carvo Loco Apr 06 '18 at 10:28
  • @CarvoLoco That question addresses the general problem of turning of auto formatting in any of the Visual Studio products. [There's even an answer for working with VS 2017](https://stackoverflow.com/a/45591141/371184), it just isn't the top answer. – Mike Cluck Apr 06 '18 at 14:55
  • @MikeC Yes, the answer referred to mentions VS2017, but no, it does not address this issue. Even the OP points out how that question did not solve their problem, and it certainly does not solve mine. Could it please be reopened? Or should I post an exact duplicate of this question? Thanks – Carvo Loco Apr 06 '18 at 17:18
  • 1
    @CarvoLoco I'm willing to vote for a reopen (I don't have to power to unilaterally open questions) but I fail to see how it doesn't help. In VS2017 you go to Options -> Text Editor -> JavaScript -> Formatting and uncheck any or all of them to disable it. Unchecking all of the checkboxes means no auto formatting will take place. The answer there isn't as in-depth as what I wrote but the information is there. – Mike Cluck Apr 06 '18 at 17:58
  • I am sorry, @MikeC, you are right. I don't know if I had to close and reopen the .js file but it has now stopped reformatting the code. I thank you for your insistence and apologize for mine. Have a good day! – Carvo Loco Apr 06 '18 at 19:30
  • @CarvoLoco Haha, no worries! I'm just here to help and I'm glad that I could. Have a good one! – Mike Cluck Apr 06 '18 at 19:48

0 Answers0