Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Commit

Permalink
Small code fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
IllusionMH committed Oct 17, 2016
1 parent 74c85fc commit 26f1cb3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/rules/noUnusedExpressionRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export class NoUnusedExpressionWalker extends Lint.RuleWalker {
}

function hasCallExpression(node: ts.Node): boolean {
const nodeToCheck = skipParenthesis(node);
const nodeToCheck = skipParentheses(node);

if (nodeToCheck.kind === ts.SyntaxKind.CallExpression) {
return true;
Expand Down Expand Up @@ -226,7 +226,7 @@ function isTopLevelExpression(node: ts.BinaryExpression): boolean {
return nodeToCheck.kind === ts.SyntaxKind.ExpressionStatement;
}

function skipParenthesis(node: ts.Node): ts.Node {
function skipParentheses(node: ts.Node): ts.Node {
let nodeToReturn = node;

while (nodeToReturn.kind === ts.SyntaxKind.ParenthesizedExpression) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,3 @@ function interactionHandler(e) {
}

[0]: expected an assignment or function call

0 comments on commit 26f1cb3

Please sign in to comment.