jdavisclark / JsFormat

Javascript formatting for Sublime Text 2 & 3
1.42k stars 222 forks source link

JSON array formatting #135

Closed carlosmcp closed 7 years ago

carlosmcp commented 9 years ago

When i use the JsFormat in sublime, i'm getting like this:

{
 'Z':  [
            { 
              nome: 'A',
              index: 0 
             },
             {
              nome: 'B',
               index: 1 
             }              
     ]
}

So, i would like to get like this:

{
 'Z': [
                { nome: 'A', index: 0 }, 
                { nome: 'B', index: 1 }
      ]
}

It's possible?

bitwiseman commented 9 years ago

Waiting on this: https://github.com/beautify-web/js-beautify/issues/315

jdavisclark commented 8 years ago

looks like recently got merged in js-beautify. marking this as jsbeautifier-upgrade

bitwiseman commented 8 years ago

@jdc0589 - Users will need to use the new brace-style: "collapse-preserve-inline" to make this work.