Skip to content

Commit

Permalink
Update: Improve report location for rest-spread-spacing (refs #12334) (
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjermanovic authored May 20, 2020
1 parent 68c8ee3 commit b0a6b81
Show file tree
Hide file tree
Showing 2 changed files with 160 additions and 17 deletions.
9 changes: 3 additions & 6 deletions lib/rules/rest-spread-spacing.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,7 @@ module.exports = {
if (alwaysSpace && !hasWhitespace) {
context.report({
node,
loc: {
line: operator.loc.end.line,
column: operator.loc.end.column
},
loc: operator.loc,
messageId: "expectedWhitespace",
data: {
type
Expand All @@ -95,8 +92,8 @@ module.exports = {
context.report({
node,
loc: {
line: operator.loc.end.line,
column: operator.loc.end.column
start: operator.loc.end,
end: nextToken.loc.start
},
messageId: "unexpectedWhitespace",
data: {
Expand Down
Loading

0 comments on commit b0a6b81

Please sign in to comment.