Jsformat configuration file: {//Exposed Jsbeautifier Options"Indent_with_tabs":false, //Keep line breaks"Preserve_newlines":true, //keep 22 newline characters in maximum succession, that is, there is a blank line"Max_preserve_newlines": 2, //there are spaces before the conditional statement"Space_before_conditional":false, //parentheses Add spaces"Space_in_paren":false, //Add a space after the parentheses of the function //"Space-after-anon-function": true,"Jslint_happy":false, //[Collapse-preserve-inline|collapse|expand|end-expand|none] ["Collapse"] //the style of the Code"Brace_style": "Collapse", "Keep_array_indentation":false, "Keep_function_indentation":false, "Eval_code":false, "Unescape_strings":false, "Break_chained_methods":false, "Wrap_attributes_indent_size": 0, "Wrap-line-length": 0, "End-with-newline":false, //Support JSX"E4X":true, //Initial indent level"Indent_level": 0, //indent two characters"Indent_size": 2, //indent 2 characters, character is a space"Indent_char": "", //" eol": "\ n", //Automatic formatting when saving"Format_on_save":true, //formatting the selected text"Format_selection":true, //whether to start the. jsbeautifyrc file"Jsbeautifyrc_files":false, "Ignore_sublime_settings":true, "Format_on_save_extensions": ["JS", "JSON"] }
Reprint Address: http://blog.csdn.net/itpinpai/article/details/53284061
Configuring Jsformat in Sublime