Skip to content

Commit

Permalink
Revert "Require semicolon for type alias" (palantir#1477)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkillian authored Aug 12, 2016
1 parent 6f3d73b commit bd0c45f
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 28 deletions.
8 changes: 0 additions & 8 deletions src/language/walker/syntaxWalker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,6 @@ export class SyntaxWalker {
this.walkChildren(node);
}

protected visitTypeAliasDeclaration(node: ts.TypeAliasDeclaration) {
this.walkChildren(node);
}

protected visitTypeAssertionExpression(node: ts.TypeAssertion) {
this.walkChildren(node);
}
Expand Down Expand Up @@ -588,10 +584,6 @@ export class SyntaxWalker {
this.visitTryStatement(<ts.TryStatement> node);
break;

case ts.SyntaxKind.TypeAliasDeclaration:
this.visitTypeAliasDeclaration(<ts.TypeAliasDeclaration> node);
break;

case ts.SyntaxKind.TypeAssertionExpression:
this.visitTypeAssertionExpression(<ts.TypeAssertion> node);
break;
Expand Down
5 changes: 0 additions & 5 deletions src/rules/semicolonRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,6 @@ class SemicolonWalker extends Lint.RuleWalker {
super.visitExportAssignment(node);
}

public visitTypeAliasDeclaration(node: ts.TypeAliasDeclaration) {
this.checkSemicolonAt(node);
super.visitTypeAliasDeclaration(node);
}

private checkSemicolonAt(node: ts.Node) {
const sourceFile = this.getSourceFile();
const children = node.getChildren(sourceFile);
Expand Down
3 changes: 0 additions & 3 deletions test/rules/semicolon/always/test.ts.lint
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,3 @@ export = Date;
export = Date
~nil [Missing semicolon]

type t = number;
type t = number
~nil [Missing semicolon]
4 changes: 0 additions & 4 deletions test/rules/semicolon/enabled/test.ts.lint
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,3 @@ export default LoginPage
export = Date;
export = Date
~nil [Missing semicolon]

type t = number;
type t = number
~nil [Missing semicolon]
4 changes: 0 additions & 4 deletions test/rules/semicolon/ignore-interfaces/test.ts.lint
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,3 @@ export default LoginPage
export = Date;
export = Date
~nil [Missing semicolon]

type t = number;
type t = number
~nil [Missing semicolon]
4 changes: 0 additions & 4 deletions test/rules/semicolon/never/test.ts.lint
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,3 @@ export default LoginPage
export = Date;
~ [Unnecessary semicolon]
export = Date

type t = number;
~ [Unnecessary semicolon]
type t = number

0 comments on commit bd0c45f

Please sign in to comment.