Skip to content

Commit 365e3d1

Browse files
authored
Merge pull request #26 from simplabs/perform
no-perform-without-catch: Adjust report node
2 parents 997a558 + 345b622 commit 365e3d1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

rules/no-perform-without-catch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module.exports = {
1515
if (effectiveParent.type !== 'ExpressionStatement') return;
1616

1717
context.report({
18-
node: node,
18+
node: property,
1919
message: 'Unhandled promise error from `perform()` call',
2020
});
2121
},

rules/no-perform-without-catch.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ ruleTester.run('no-perform-without-catch', rule, {
2929
{
3030
code: `function foo() { this.submitTask.perform(); }`,
3131
errors: [
32-
{ message: 'Unhandled promise error from `perform()` call', column: 18, endColumn: 43 },
32+
{ message: 'Unhandled promise error from `perform()` call', column: 34, endColumn: 41 },
3333
],
3434
},
3535
{
3636
code: `function foo() { this.submitTask.perform().then().then(); }`,
3737
errors: [
38-
{ message: 'Unhandled promise error from `perform()` call', column: 18, endColumn: 43 },
38+
{ message: 'Unhandled promise error from `perform()` call', column: 34, endColumn: 41 },
3939
],
4040
},
4141
],

0 commit comments

Comments
 (0)