当前位置: 动力学知识库 > 问答 > 编程问答 >

visual studio - Javascript object array initializer formatting

问题描述:

My IDE is visual studio 2015 with Resharper 9.2, I want the javascript object array initializer automatically formated like this

var x = [{

a: 1,

b: 2

},{

a: 3,

b: 4

}];

I want the round and square brackets together, Any ideas how can i do this?

It is always formatted like this:

var x = [

{

a: 1,

b: 2

},{

a: 3,

b: 4

}

];

网友答案:

You can change the formatting rules of VS as explained here. The problem should be solved by selecting either block or smart.

分享给朋友:
您可能感兴趣的文章:
随机阅读: