diff --git a/bin/tslint-cli.js b/bin/tslint-cli.js index bba5a53ce34..756fabb4ce8 100644 --- a/bin/tslint-cli.js +++ b/bin/tslint-cli.js @@ -27070,10 +27070,11 @@ var Lint; _super.apply(this, arguments); } IndentRule.prototype.isEnabled = function () { - var option = this.getOptions()[0]; - - if (typeof option === "number" && option > 0) { - return true; + if (_super.prototype.isEnabled.call(this)) { + var option = this.getOptions()[0]; + if (typeof option === "number" && option > 0) { + return true; + } } return false; @@ -27426,10 +27427,11 @@ var Lint; _super.apply(this, arguments); } MaxLenRule.prototype.isEnabled = function () { - var option = this.getOptions()[0]; - - if (typeof option === "number" && option > 0) { - return true; + if (_super.prototype.isEnabled.call(this)) { + var option = this.getOptions()[0]; + if (typeof option === "number" && option > 0) { + return true; + } } return false; @@ -27802,8 +27804,12 @@ var Lint; _super.apply(this, arguments); } QuoteMarkRule.prototype.isEnabled = function () { - var quoteMarkString = this.getOptions()[0]; - return (quoteMarkString === "single" || quoteMarkString === "double"); + if (_super.prototype.isEnabled.call(this)) { + var quoteMarkString = this.getOptions()[0]; + return (quoteMarkString === "single" || quoteMarkString === "double"); + } + + return false; }; QuoteMarkRule.prototype.apply = function (syntaxTree) { diff --git a/lib/tslint.js b/lib/tslint.js index e671182d260..bcb9e2b3750 100644 --- a/lib/tslint.js +++ b/lib/tslint.js @@ -27070,10 +27070,11 @@ var Lint; _super.apply(this, arguments); } IndentRule.prototype.isEnabled = function () { - var option = this.getOptions()[0]; - - if (typeof option === "number" && option > 0) { - return true; + if (_super.prototype.isEnabled.call(this)) { + var option = this.getOptions()[0]; + if (typeof option === "number" && option > 0) { + return true; + } } return false; @@ -27426,10 +27427,11 @@ var Lint; _super.apply(this, arguments); } MaxLenRule.prototype.isEnabled = function () { - var option = this.getOptions()[0]; - - if (typeof option === "number" && option > 0) { - return true; + if (_super.prototype.isEnabled.call(this)) { + var option = this.getOptions()[0]; + if (typeof option === "number" && option > 0) { + return true; + } } return false; @@ -27802,8 +27804,12 @@ var Lint; _super.apply(this, arguments); } QuoteMarkRule.prototype.isEnabled = function () { - var quoteMarkString = this.getOptions()[0]; - return (quoteMarkString === "single" || quoteMarkString === "double"); + if (_super.prototype.isEnabled.call(this)) { + var quoteMarkString = this.getOptions()[0]; + return (quoteMarkString === "single" || quoteMarkString === "double"); + } + + return false; }; QuoteMarkRule.prototype.apply = function (syntaxTree) { diff --git a/src/rules/indentRule.ts b/src/rules/indentRule.ts index fe1c6da40bd..a4d950af662 100644 --- a/src/rules/indentRule.ts +++ b/src/rules/indentRule.ts @@ -23,10 +23,11 @@ module Lint.Rules { public static FAILURE_STRING = "unexpected tab width: "; public isEnabled(): boolean { - var option = this.getOptions()[0]; - - if (typeof option === "number" && option > 0) { - return true; + if (super.isEnabled()) { + var option = this.getOptions()[0]; + if (typeof option === "number" && option > 0) { + return true; + } } return false; diff --git a/src/rules/maxLenRule.ts b/src/rules/maxLenRule.ts index 31bfe951ec7..59c38603fbe 100644 --- a/src/rules/maxLenRule.ts +++ b/src/rules/maxLenRule.ts @@ -23,10 +23,11 @@ module Lint.Rules { public static FAILURE_STRING = "exceeds maximum line length of "; public isEnabled(): boolean { - var option = this.getOptions()[0]; - - if (typeof option === "number" && option > 0) { - return true; + if (super.isEnabled()) { + var option = this.getOptions()[0]; + if (typeof option === "number" && option > 0) { + return true; + } } return false; diff --git a/src/rules/quoteMarkRule.ts b/src/rules/quoteMarkRule.ts index 19585fef812..9a885f32916 100644 --- a/src/rules/quoteMarkRule.ts +++ b/src/rules/quoteMarkRule.ts @@ -28,8 +28,12 @@ module Lint.Rules { public static DOUBLE_QUOTE_FAILURE = "' should be \""; public isEnabled(): boolean { - var quoteMarkString = this.getOptions()[0]; - return (quoteMarkString === "single" || quoteMarkString === "double"); + if (super.isEnabled()) { + var quoteMarkString = this.getOptions()[0]; + return (quoteMarkString === "single" || quoteMarkString === "double"); + } + + return false; } public apply(syntaxTree: TypeScript.SyntaxTree): RuleFailure[] {