Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update: report operator location in operator-linebreak (refs #12334) (#…
  • Loading branch information
mdjermanovic committed Mar 27, 2020
1 parent 081e240 commit 105384c
Show file tree
Hide file tree
Showing 2 changed files with 143 additions and 58 deletions.
20 changes: 4 additions & 16 deletions lib/rules/operator-linebreak.js
Expand Up @@ -172,10 +172,7 @@ module.exports = {
// lone operator
context.report({
node,
loc: {
line: operatorToken.loc.end.line,
column: operatorToken.loc.end.column
},
loc: operatorToken.loc,
messageId: "badLinebreak",
data: {
operator
Expand All @@ -187,10 +184,7 @@ module.exports = {

context.report({
node,
loc: {
line: operatorToken.loc.end.line,
column: operatorToken.loc.end.column
},
loc: operatorToken.loc,
messageId: "operatorAtBeginning",
data: {
operator
Expand All @@ -202,10 +196,7 @@ module.exports = {

context.report({
node,
loc: {
line: operatorToken.loc.end.line,
column: operatorToken.loc.end.column
},
loc: operatorToken.loc,
messageId: "operatorAtEnd",
data: {
operator
Expand All @@ -217,10 +208,7 @@ module.exports = {

context.report({
node,
loc: {
line: operatorToken.loc.end.line,
column: operatorToken.loc.end.column
},
loc: operatorToken.loc,
messageId: "noLinebreak",
data: {
operator
Expand Down

0 comments on commit 105384c

Please sign in to comment.