Skip to content

Commit

Permalink
Merge pull request palantir#171 from DickvdBrink/interface-rename
Browse files Browse the repository at this point in the history
Renamed Rule and Formatter interface
  • Loading branch information
ashwinr committed Jun 25, 2014
2 parents 177c30c + 3f7776e commit 4b00775
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions lib/tslint.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6483,7 +6483,7 @@ declare module Lint {
startPosition: number;
endPosition: number;
}
interface Rule {
interface IRule {
getOptions(): IOptions;
isEnabled(): boolean;
apply(syntaxTree: TypeScript.SyntaxTree): RuleFailure[];
Expand Down Expand Up @@ -6547,14 +6547,14 @@ declare module Lint {
[name: string]: any;
}, enableDisableRuleMap: {
[rulename: string]: IEnableDisablePosition[];
}, rulesDirectory?: string): Rule[];
}, rulesDirectory?: string): IRule[];
function findRule(name: string, rulesDirectory?: string): any;
}
declare module Lint.Configuration {
function findConfiguration(configFile: string): any;
}
declare module Lint {
interface Formatter {
interface IFormatter {
format(failures: Lint.RuleFailure[]): string;
}
}
Expand Down Expand Up @@ -10800,12 +10800,12 @@ declare module Lint {
function doesIntersect(failure: RuleFailure, disabledIntervals: IDisabledInterval[]): boolean;
}
declare module Lint.Formatters {
class AbstractFormatter implements Lint.Formatter {
class AbstractFormatter implements Lint.IFormatter {
public format(failures: Lint.RuleFailure[]): string;
}
}
declare module Lint.Rules {
class AbstractRule implements Lint.Rule {
class AbstractRule implements Lint.IRule {
private value;
private options;
constructor(ruleName: string, value: any, disabledIntervals: Lint.IDisabledInterval[]);
Expand Down
2 changes: 1 addition & 1 deletion src/language/formatter/abstractFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/// <reference path='formatter.ts' />

module Lint.Formatters {
export class AbstractFormatter implements Lint.Formatter {
export class AbstractFormatter implements Lint.IFormatter {
/* tslint:disable:no-unused-variable */
public format(failures: Lint.RuleFailure[]): string {
throw TypeScript.Errors.abstract();
Expand Down
2 changes: 1 addition & 1 deletion src/language/formatter/formatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/// <reference-path='../rule/rule.ts'/>

module Lint {
export interface Formatter {
export interface IFormatter {
format(failures: Lint.RuleFailure[]): string;
}
}
2 changes: 1 addition & 1 deletion src/language/rule/abstractRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/// <reference path='rule.ts'/>

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

Expand Down
2 changes: 1 addition & 1 deletion src/language/rule/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module Lint {
endPosition: number;
}

export interface Rule {
export interface IRule {
getOptions(): IOptions;

isEnabled(): boolean;
Expand Down
4 changes: 2 additions & 2 deletions src/ruleLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ module Lint {

export function loadRules(ruleConfiguration: {[name: string]: any},
enableDisableRuleMap: {[rulename: string]: Lint.IEnableDisablePosition[]},
rulesDirectory?: string): Rule[] {
var rules: Rule[] = [];
rulesDirectory?: string): IRule[] {
var rules: IRule[] = [];
for (var ruleName in ruleConfiguration) {
if (ruleConfiguration.hasOwnProperty(ruleName)) {
var ruleValue = ruleConfiguration[ruleName];
Expand Down
2 changes: 1 addition & 1 deletion src/tslint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ module Lint {
}
}

var formatter: Lint.Formatter;
var formatter: Lint.IFormatter;
var formattersDirectory = this.getRelativePath(this.options.formattersDirectory);

var Formatter = Lint.findFormatter(this.options.formatter, formattersDirectory);
Expand Down

0 comments on commit 4b00775

Please sign in to comment.