Skip to content

Commit

Permalink
Use booleans instead of strings for testing whther a check is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelgmiller committed Jul 24, 2013
1 parent 4e51968 commit 89ebb39
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/tslint/rules/WhitespaceRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module Lint.Rules {
}

public isEnabled() : boolean {
return this.getValue() === "true";
return this.getValue() === true;
}

public apply(syntaxTree: TypeScript.SyntaxTree): RuleFailure[] {
Expand Down
2 changes: 1 addition & 1 deletion src/tslint/rules/semicolonRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module Lint.Rules {
}

public isEnabled() : boolean {
return this.getValue() === "true";
return this.getValue() === true;
}

public apply(syntaxTree: TypeScript.SyntaxTree): RuleFailure[] {
Expand Down
2 changes: 1 addition & 1 deletion src/tslint/rules/tripleComparisonRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module Lint.Rules {
}

public isEnabled() : boolean {
return this.getValue() === "true";
return this.getValue() === true;
}

public apply(syntaxTree: TypeScript.SyntaxTree): RuleFailure[] {
Expand Down
6 changes: 3 additions & 3 deletions tslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -63135,7 +63135,7 @@ var Lint;
_super.call(this, "semicolon");
}
SemicolonRule.prototype.isEnabled = function () {
return this.getValue() === "true";
return this.getValue() === true;
};

SemicolonRule.prototype.apply = function (syntaxTree) {
Expand Down Expand Up @@ -63173,7 +63173,7 @@ var Lint;
_super.call(this, "triple_eq_neq");
}
TripleComparisonRule.prototype.isEnabled = function () {
return this.getValue() === "true";
return this.getValue() === true;
};

TripleComparisonRule.prototype.apply = function (syntaxTree) {
Expand Down Expand Up @@ -63313,7 +63313,7 @@ var Lint;
_super.call(this, "enclosing_whitespace");
}
WhitespaceRule.prototype.isEnabled = function () {
return this.getValue() === "true";
return this.getValue() === true;
};

WhitespaceRule.prototype.apply = function (syntaxTree) {
Expand Down

0 comments on commit 89ebb39

Please sign in to comment.