Skip to content

Commit

Permalink
feat(rules): improve reported context node selection
Browse files Browse the repository at this point in the history
  • Loading branch information
alecxe committed Jul 11, 2017
1 parent 9afc8e2 commit 61d9098
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/rules/no-browser-driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {

if (object && object.name === 'browser' && property && property.name === 'driver') {
context.report({
node: node,
node: property,
message: 'Unexpected use of browser.driver instead of browser'
})
}
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-browser-pause.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {

if (object && property && object.name === 'browser' && property.name === 'pause') {
context.report({
node: node,
node: property,
message: 'Unexpected browser.pause()'
})
}
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-browser-sleep.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {

if (object && property && object.name === 'browser' && property.name === 'sleep') {
context.report({
node: node,
node: property,
message: 'Unexpected browser.sleep()'
})
}
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-by-xpath.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {

if (object && property && object.name === 'by' && property.name === 'xpath') {
context.report({
node: node,
node: property,
message: 'Unexpected by.xpath()'
})
}
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-get-location-abs-url.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {

if (object && property && object.name === 'browser' && property.name === 'getLocationAbsUrl') {
context.report({
node: node,
node: property,
message: 'Unexpected browser.getLocationAbsUrl()'
})
}
Expand Down

0 comments on commit 61d9098

Please sign in to comment.