From cbb2ba2f92b3352b5440b4b4160ecac97794e444 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Thu, 13 Dec 2018 13:35:44 -0800 Subject: [PATCH] node.getWidth() in no-backbone-get-set-outside-model (#663) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #662 😄 --- src/noBackboneGetSetOutsideModelRule.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/noBackboneGetSetOutsideModelRule.ts b/src/noBackboneGetSetOutsideModelRule.ts index b80dbea3f..194031f08 100644 --- a/src/noBackboneGetSetOutsideModelRule.ts +++ b/src/noBackboneGetSetOutsideModelRule.ts @@ -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);