Duplicate: VS2008 Removes my Indentation in .js file (Turn off auto formatting in the formatting tab)
Hi I have VS2008 and ReSharper 4.0 and I'm having a problem. When I enter a new line of code in any .js file, it goes thru and reformats all of the JavaScript braces. I've found where in ReSharper where I can set brace behavior for C# (.cs) files. I've searched in VS2008 and couldn't find any settings for JavaScript code.
    function doSomething(withMe) 
    {
        for (idx in myArray) 
        {
            if (myArray[idx] != -1) 
            {
                return "yep";
            }
        }
        return "nope";
    }
Become this (which I like better, but my team likes the above instead)
    function doSomething(withMe) {
        for (idx in myArray) {
            if (myArray[idx] != -1) {
                return "yep";
            }
        }
        return "nope";      
    }
It's getting painful to go back and re-add the CRs everywhere. Where can I find the setting to make this madness stop.
Go To Tools -> Options.
Expand Text Editor
Expand JScript
Uncheck all of the formatting options.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With