javascriptformattingresharperresharper-9.0

Stop ReSharper from putting JavaScript function parameter onto new line


How can I stop ReSharper formatting from turning this:

define(['Spec'], function (Spec) {

});

into this:

define(['Spec'],
    function(Spec) {

    });

I've tried various combinations of settings but have not hit upon the right one yet.


Solution

  • Try changing the following setting to "Simple wrap": ReSharper | Options | Code Editing | JavaScript | Formatting Style | Line Breaks | Wrapping and chopping | Wrap invocation arguments