Skip to content

Instantly share code, notes, and snippets.

@phucpnt
Forked from softwarespot/.jsbeautifyrc
Created August 18, 2016 02:08
Show Gist options
  • Save phucpnt/e9c10a556535d2cea16b531b7edcd29f to your computer and use it in GitHub Desktop.
Save phucpnt/e9c10a556535d2cea16b531b7edcd29f to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment