Skip to content

Instantly share code, notes, and snippets.

@tarzan
Last active July 13, 2018 12:43
Show Gist options
  • Save tarzan/7198727 to your computer and use it in GitHub Desktop.
Save tarzan/7198727 to your computer and use it in GitHub Desktop.
.jsbeautifyrc
{
// Details: https://github.com/victorporof/Sublime-HTMLPrettify#using-your-own-jsbeautifyrc-options
// Documentation: https://github.com/einars/js-beautify/
"html": {
"brace_style": "collapse", // "expand", "end-expand", "expand-strict"
"indent_char": " ",
"indent_scripts": "keep", // "separate", "normal"
"indent_size": 4,
"max_preserve_newlines": 10,
"preserve_newlines": true,
"unformatted": ["a", "sub", "sup", "b", "i", "u"],
"wrap_line_length": 0
},
"css": {
"indent_char": " ",
"indent_size": 2
},
"js": {
"brace_style": "collapse", // "expand", "end-expand", "expand-strict"
"break_chained_methods": false,
"e4x": false,
"eval_code": false,
"indent_char": " ",
"indent_level": 0,
"indent_size": 2, // <- important to note, default was 4 but we prefer 2
"indent_with_tabs": false,
"jslint_happy": true, // <- don't know what this does, do we want JSlint to be happy?
"keep_array_indentation": false,
"keep_function_indentation": false,
"max_preserve_newlines": 10,
"preserve_newlines": true,
"space_before_conditional": true, // <- yes to 'if (statement)'
"space_in_paren": false, // <- but no to 'if ( statement )'
"unescape_strings": false,
"wrap_line_length": 0
}
}
@ducpho
Copy link

ducpho commented Nov 18, 2013

Yes, we want JSLint to be happy.

@bslipek
Copy link

bslipek commented Jun 25, 2014

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment