Skip to content

Commit 189357d

Browse files
committed
Tighten no ++/-- rule
1 parent a69825e commit 189357d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

scripts/tslint/noIncrementDecrementRule.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ class IncrementDecrementWalker extends Lint.RuleWalker {
2828
}
2929

3030
visitIncrementDecrement(node: ts.UnaryExpression) {
31-
if (node.parent && (node.parent.kind === ts.SyntaxKind.ExpressionStatement || node.parent.kind === ts.SyntaxKind.ForStatement || node.parent.kind === ts.SyntaxKind.ElementAccessExpression)) {
31+
if (node.parent && (node.parent.kind === ts.SyntaxKind.ExpressionStatement ||
32+
node.parent.kind === ts.SyntaxKind.ForStatement)) {
3233
return;
3334
}
3435
this.addFailure(this.createFailure(node.getStart(), node.getWidth(), Rule.POSTFIX_FAILURE_STRING));

0 commit comments

Comments
 (0)