9/1/2015 - 5:20 AM

JS Beautifier configuration

JS Beautifier configuration

// Documentation: https://github.com/beautify-web/js-beautify
// Example URL: https://github.com/victorporof/Sublime-HTMLPrettify/blob/master/.jsbeautifyrc
// Based on Airbnb's JavaScript Style Guide, URL: https://github.com/airbnb/javascript
    // Collapse curly brackets
    "brace_style": "collapse",

    // Break chained method calls across subsequent lines
    "break_chained_methods": true,

    // End output with newline
    "end_with_newline": true,

    // Evaluate code
    "eval_code": false,

    // Indentation character
    "indent_char": " ",

    // Initial indentation level
    "indent_level": 0,

    // Indentation character size
    "indent_size": 4,

    // Indent with tabs, overrides 'indent_size' and 'indent_char'
    "indent_with_tabs": false,

    // Enable jslint-stricter mode
    "jslint_happy": false,

    // Preserve array indentation
    "keep_array_indentation": false,

    // Preserve function indentation
    "keep_function_indentation": false,

    // Number of line-breaks to be preserved in one chunk
    "max_preserve_newlines": 10,

    // Preserve newlines
    "preserve_newlines": true,

    // Add a space before an anonymous function's parentheses, i.e. function ()
    "space_after_anon_function": true,

    // Add a space before the conditional statement i.e. 'if (true)'
    "space_before_conditional": true,

    // Add padding spaces within empty parentheses i.e. 'f( )'
    "space_in_empty_paren": false,

    // Add padding spaces within parentheses i.e. 'f( a, b )'
    "space_in_paren": false,

    // Decode printable characters encoded in xNN notation
    "unescape_strings": false,

    // Wrap lines at next opportunity after N characters
    "wrap_line_length": 0
// Note: Remove the comments when adding to the project