jdavisclark / JsFormat

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

ignore array of objects formating #173

Closed ctf0 closed 8 years ago

ctf0 commented 8 years ago

settings

{
    "brace_style": "collapse", // expand
    "keep_function_indentation": true,
    "jsbeautifyrc_files": true
}

something like

var vm = new Vue({
    el: '#app',
    data: {
        items: [
            { message: 'Foo' },
            { message: 'Bar' }
        ]
    },
});

becomes

var vm = new Vue({
    el: '#app',
    data: {
        items: [{
            message: 'Foo'
        }, {
            message: 'Bar'
        }]
    },
});

it would be more suitable to keep it on one line.

DiegoZoracKy commented 8 years ago

Try by setting this config:

"brace_style": "collapse-preserve-inline"

ctf0 commented 8 years ago

perfect, many thanx