Skip to content

Commit

Permalink
AbstractFormatter and AbstractRule are now abstract classes
Browse files Browse the repository at this point in the history
  • Loading branch information
DickvdBrink committed Sep 16, 2015
1 parent b93535b commit 18e9e89
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
6 changes: 2 additions & 4 deletions src/language/formatter/abstractFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
*/

module Lint.Formatters {
export class AbstractFormatter implements Lint.IFormatter {
public format(failures: Lint.RuleFailure[]): string {
throw Lint.abstract();
}
export abstract class AbstractFormatter implements Lint.IFormatter {
public abstract format(failures: Lint.RuleFailure[]): string;
}
}
8 changes: 2 additions & 6 deletions src/language/rule/abstractRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

module Lint.Rules {
export class AbstractRule implements Lint.IRule {
export abstract class AbstractRule implements Lint.IRule {
private value: any;
private options: Lint.IOptions;

Expand All @@ -38,11 +38,7 @@ module Lint.Rules {
return this.options;
}

/* tslint:disable:no-unused-variable */
public apply(sourceFile: ts.SourceFile): RuleFailure[] {
throw Lint.abstract();
}
/* tslint:enable:no-unused-variable */
public abstract apply(sourceFile: ts.SourceFile): RuleFailure[];

public applyWithWalker(walker: Lint.RuleWalker): RuleFailure[] {
walker.walk(walker.getSourceFile());
Expand Down

0 comments on commit 18e9e89

Please sign in to comment.