Skip to content

Commit

Permalink
Used 'node' for context.report, closes #36.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Ascari committed Nov 19, 2016
1 parent 6f49856 commit c931de0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rules/always-return.js
Expand Up @@ -85,7 +85,7 @@ module.exports = {
onCodePathSegmentStart: function (segment, node) {
var funcInfo = peek(funcInfoStack)
funcInfo.branchIDStack.push(segment.id)
funcInfo.branchInfoMap[segment.id] = {good: false, loc: node.loc}
funcInfo.branchInfoMap[segment.id] = {good: false, node: node}
},

onCodePathSegmentEnd: function (segment, node) {
Expand Down Expand Up @@ -120,7 +120,7 @@ module.exports = {

context.report({
message: 'Each then() should return a value or throw',
loc: branch.loc
node: branch.node
})
}
})
Expand Down

0 comments on commit c931de0

Please sign in to comment.