Skip to content

Commit

Permalink
Merge pull request #45 from ascariandrea/36-rule_always_return_fails_…
Browse files Browse the repository at this point in the history
…on_import

Replaced 'loc' with 'node' for context.report
  • Loading branch information
xjamundx committed Nov 21, 2016
2 parents 6f49856 + c931de0 commit 803a4ab
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 803a4ab

Please sign in to comment.