Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Commit

Permalink
node.getWidth() in no-backbone-get-set-outside-model
Browse files Browse the repository at this point in the history
Fixes #662 😄
  • Loading branch information
Josh Goldberg authored Dec 3, 2018
1 parent 33d330e commit 002c18a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/noBackboneGetSetOutsideModelRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ class NoBackboneGetSetOutsideModelRuleWalker extends Lint.RuleWalker {
const functionName: string = AstUtils.getFunctionName(node);
if (functionName === 'get' && node.arguments.length === 1 && node.arguments[0].kind === ts.SyntaxKind.StringLiteral) {
const msg: string = Rule.GET_FAILURE_STRING + node.getText();
this.addFailureAt(node.getStart(), node.getEnd(), msg);
this.addFailureAt(node.getStart(), node.getWidth(), msg);
}
if (functionName === 'set' && node.arguments.length === 2 && node.arguments[0].kind === ts.SyntaxKind.StringLiteral) {
const msg: string = Rule.SET_FAILURE_STRING + node.getText();
this.addFailureAt(node.getStart(), node.getEnd(), msg);
this.addFailureAt(node.getStart(), node.getWidth(), msg);
}
}
super.visitCallExpression(node);
Expand Down

0 comments on commit 002c18a

Please sign in to comment.