Code Style & JavaScript Array initialization

I'm trying to get WebStorms to format my array initialization on "Reformat code" like this:

var hurz =  {     items: [{         property: 'hurz1'     }, {         property: 'hurz2'     }, {         property: 'hurz3'     }] };

But WebStorms will always format it like this:

var hurz = {     items: [         {             property: 'hurz1'         },         {             property: 'hurz2'         },         {             property: 'hurz3'         }     ] };

So far I was unable to find a the correct settings in the Code Style section. Could somebody please enlighten me?

By the way, it would be super helpful to be able to paste your own code into the Preview window of the Code Style setting in order to be able to see how the setting is formatting the code.

Thanks in advance!

- currently there are no settings which would force { and [ stay together, feel free to file a feature reqeust for this here:
- you already can paste your code to the preview area.


Please sign in to leave a comment.