[Idea 10.5.4] JavaScript Formatting Issue

Hi,

basically my JS Code is formatted as I want it to be... but there is one thing I cannot manage... I want my JS Code - if I initialize a raw JSON object as method parameter - to be formatted like this:

this.obj = new MyNamespace.MyObj({
  a: this.store,
  b: this.size,
  c: {},
  d: 'myValue',
  e: this
});


but unfortunately - after pressing CTRL+ALT+L it looks like this!

this.obj= new MyNamespace.MyObj({
                                 a: this.store,
                                 b: this.size,
                                 c: {},
                                 d: 'myValue',
                                 e: this
                               });


In an earlier versions of Idea it worked...
As a temporary fix I insert a line break after the opening curly brace, but this is not my desired code style.

Thanks in advance for any support,
Alina

2 comments
Comment actions Permalink

Check Settings|Code Style|JavaScript|Wrapping and Braces|Function call arguments. The "Align when multiline" flag should be off to achieve the desired result (actually it's off by default).

0
Comment actions Permalink

OMG, you are my hero! It works perfectly! Thank you! :)

0

Please sign in to leave a comment.