Skip to content

Commit

Permalink
jslint happy default and comma first 😄
Browse files Browse the repository at this point in the history
  • Loading branch information
scott2449 committed Oct 21, 2012
1 parent 428ba15 commit 21d5ddb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion JsFormat.sublime-settings
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"brace_style": "collapse",
"jslint_happy": false,
"jslint_happy": true,
"keep_array_indentation": false,
"max_preserve_newlines": 4,
"preserve_newlines": true,
Expand Down
4 changes: 3 additions & 1 deletion jsbeautifier/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@ def get_next_token(self):
if self.wanted_newline and \
self.last_type != 'TK_OPERATOR' and\
self.last_type != 'TK_EQUALS' and\
self.last_type != 'TK_COMMA' and\
not self.flags.if_line and \
(self.opts.preserve_newlines or self.last_text != 'var'):
self.append_newline()
Expand Down Expand Up @@ -1011,8 +1012,9 @@ def handle_comma(self, token_text):
self.append(' ')
else:
if self.flags.mode == 'OBJECT':
self.append(token_text)
self.append_newline()
self.append(token_text)
self.append(' ')
else:
# EXPR or DO_BLOCK
self.append(token_text)
Expand Down

0 comments on commit 21d5ddb

Please sign in to comment.