jdavisclark/JsFormat

ignore array of objects formating

Closed this issue · 2 comments

ctf0 commented

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.

Try by setting this config:

"brace_style": "collapse-preserve-inline"

ctf0 commented

perfect, many thanx