diff options
Diffstat (limited to 'node_modules/tslint/lib/rules/noBooleanLiteralCompareRule.js')
-rw-r--r-- | node_modules/tslint/lib/rules/noBooleanLiteralCompareRule.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/node_modules/tslint/lib/rules/noBooleanLiteralCompareRule.js b/node_modules/tslint/lib/rules/noBooleanLiteralCompareRule.js index cefd393ec..efe5027c1 100644 --- a/node_modules/tslint/lib/rules/noBooleanLiteralCompareRule.js +++ b/node_modules/tslint/lib/rules/noBooleanLiteralCompareRule.js @@ -40,6 +40,7 @@ var Rule = /** @class */ (function (_super) { optionsDescription: "Not configurable.", options: null, optionExamples: [true], + rationale: Lint.Utils.dedent(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n Comparing boolean values to boolean literals is unnecessary, as those expressions will result in booleans too.\n Just use the boolean values directly or negate them.\n "], ["\n Comparing boolean values to boolean literals is unnecessary, as those expressions will result in booleans too.\n Just use the boolean values directly or negate them.\n "]))), type: "style", typescriptOnly: true, requiresTypeInfo: true, @@ -60,7 +61,7 @@ function walk(ctx, checker) { } function getBooleanComparison(node, checker) { var cmp = deconstructComparison(node); - return cmp === undefined || !Lint.isTypeFlagSet(checker.getTypeAtLocation(cmp.expression), ts.TypeFlags.Boolean) ? undefined : cmp; + return cmp === undefined || !utils.isTypeFlagSet(checker.getTypeAtLocation(cmp.expression), ts.TypeFlags.Boolean) ? undefined : cmp; } function fix(node, _a) { var negate = _a.negate, expression = _a.expression; @@ -119,3 +120,4 @@ function booleanFromExpression(node) { return undefined; } } +var templateObject_1; |