jdavisclark/JsFormat

Is this format right?

Closed this issue · 0 comments

The source code:

var a = 1
    // 111
    , b=2
     // 222
    , c  = 3
    , d = 4;

The generated code:

var a = 1
    // 111
    ,
    b = 2
    // 222
    ,
    c = 3,
    d = 4;

But the required code should be:

var a = 1,
    // 111
    b = 2,
    // 222
    c = 3,
    d = 4;

Is there a problem here?

The jsformat config of sublimetext3 is:

{
    // exposed jsbeautifier options
    "indent_with_tabs": false,
    "preserve_newlines": true,
    "max_preserve_newlines": 4,
    "space_in_paren": false,
    "jslint_happy": false,
    "brace_style": "collapse",
    "keep_array_indentation": false,
    "keep_function_indentation": false,
    "eval_code": false,
    "unescape_strings": false,
    "break_chained_methods": false,
    "e4x": false,
    "wrap_line_length": 0,
    "eol": "\r\n",
    "indent_size": 4,
    "indent_char": " ",

    // jsformat options
    "format_on_save": false,
    "jsbeautifyrc_files": false,
    "ignore_sublime_settings": true
}