Skip to content

Commit

Permalink
remove typescript as a submodule and embed it directly
Browse files Browse the repository at this point in the history
- needed for integration with travis
  • Loading branch information
ashwinr committed Sep 23, 2013
1 parent 5610d97 commit 46f974b
Show file tree
Hide file tree
Showing 197 changed files with 95,796 additions and 6 deletions.
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

4 changes: 4 additions & 0 deletions bin/tslint-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -27081,6 +27081,7 @@ var Lint;
if (blockStatements.childCount() === 1) {
return;
}

var ifStatement = (firstBlockStatement).statement;
if (this.nodeIsContinue(ifStatement)) {
return;
Expand All @@ -27096,15 +27097,18 @@ var Lint;

ForInWalker.prototype.nodeIsContinue = function (node) {
var kind = node.kind();

if (kind === TypeScript.SyntaxKind.ContinueStatement) {
return true;
}

if (kind === TypeScript.SyntaxKind.Block) {
var blockStatements = (node).statements;
if (blockStatements.childCount() === 1 && blockStatements.childAt(0).kind() === TypeScript.SyntaxKind.ContinueStatement) {
return true;
}
}

return false;
};
return ForInWalker;
Expand Down
31 changes: 29 additions & 2 deletions lib/tslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -27075,15 +27075,42 @@ var Lint;
if (statementKind === TypeScript.SyntaxKind.Block) {
var blockNode = statement;
var blockStatements = blockNode.statements;
if (blockStatements.childCount() === 1 && blockStatements.childAt(0).kind() === TypeScript.SyntaxKind.IfStatement) {
return;
if (blockStatements.childCount() >= 1) {
var firstBlockStatement = blockStatements.childAt(0);
if (firstBlockStatement.kind() === TypeScript.SyntaxKind.IfStatement) {
if (blockStatements.childCount() === 1) {
return;
}

var ifStatement = (firstBlockStatement).statement;
if (this.nodeIsContinue(ifStatement)) {
return;
}
}
}
}

var position = this.position() + node.leadingTriviaWidth();
var failure = this.createFailure(position, node.width(), ForInRule.FAILURE_STRING);
this.addFailure(failure);
};

ForInWalker.prototype.nodeIsContinue = function (node) {
var kind = node.kind();

if (kind === TypeScript.SyntaxKind.ContinueStatement) {
return true;
}

if (kind === TypeScript.SyntaxKind.Block) {
var blockStatements = (node).statements;
if (blockStatements.childCount() === 1 && blockStatements.childAt(0).kind() === TypeScript.SyntaxKind.ContinueStatement) {
return true;
}
}

return false;
};
return ForInWalker;
})(Lint.RuleWalker);
})(Lint.Rules || (Lint.Rules = {}));
Expand Down
1 change: 0 additions & 1 deletion src/typescript
Submodule typescript deleted from 85e121
Loading

0 comments on commit 46f974b

Please sign in to comment.