Skip to content

Commit

Permalink
eslint's operator-linebreak rule now supports the ternary operator.
Browse files Browse the repository at this point in the history
Changed the rule to match the code, and fixed the single instance
in the code that was different.
  • Loading branch information
nkovacs committed Sep 3, 2015
1 parent 5705239 commit f4d4362
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
"object-shorthand": 0,
"one-var": [2, { "initialized": "never" }],
"operator-assignment": 0,
"operator-linebreak": [2, "after"],
"operator-linebreak": [2, "after", { "overrides": { "?": "before", ":": "before" } }],
"padded-blocks": 0,
"prefer-const": 0,
"quote-props": 0,
Expand Down
4 changes: 2 additions & 2 deletions src/watcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ Watcher.prototype.get = function () {
'Error when evaluating expression "' +
this.expression + '". ' +
(config.debug
? '' :
'Turn on debug mode to see stack trace.'
? ''
: 'Turn on debug mode to see stack trace.'
), e
)
}
Expand Down
2 changes: 1 addition & 1 deletion test/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
"object-shorthand": 0,
"one-var": [2, { "initialized": "never" }],
"operator-assignment": 0,
"operator-linebreak": [2, "after"],
"operator-linebreak": [2, "after", { "overrides": { "?": "before", ":": "before" } }],
"padded-blocks": 0,
"prefer-const": 0,
"quote-props": 0,
Expand Down

0 comments on commit f4d4362

Please sign in to comment.