Skip to content

Commit f4d4362

Browse files
committedSep 3, 2015
eslint's operator-linebreak rule now supports the ternary operator.
Changed the rule to match the code, and fixed the single instance in the code that was different.
1 parent 5705239 commit f4d4362

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed
 

‎.eslintrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
"object-shorthand": 0,
138138
"one-var": [2, { "initialized": "never" }],
139139
"operator-assignment": 0,
140-
"operator-linebreak": [2, "after"],
140+
"operator-linebreak": [2, "after", { "overrides": { "?": "before", ":": "before" } }],
141141
"padded-blocks": 0,
142142
"prefer-const": 0,
143143
"quote-props": 0,

‎src/watcher.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ Watcher.prototype.get = function () {
9696
'Error when evaluating expression "' +
9797
this.expression + '". ' +
9898
(config.debug
99-
? '' :
100-
'Turn on debug mode to see stack trace.'
99+
? ''
100+
: 'Turn on debug mode to see stack trace.'
101101
), e
102102
)
103103
}

‎test/.eslintrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
"object-shorthand": 0,
148148
"one-var": [2, { "initialized": "never" }],
149149
"operator-assignment": 0,
150-
"operator-linebreak": [2, "after"],
150+
"operator-linebreak": [2, "after", { "overrides": { "?": "before", ":": "before" } }],
151151
"padded-blocks": 0,
152152
"prefer-const": 0,
153153
"quote-props": 0,

0 commit comments

Comments
 (0)
Please sign in to comment.