aboutsummaryrefslogtreecommitdiff
path: root/node_modules/tslint/lib/rules/noBitwiseRule.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/tslint/lib/rules/noBitwiseRule.js')
-rw-r--r--node_modules/tslint/lib/rules/noBitwiseRule.js28
1 files changed, 14 insertions, 14 deletions
diff --git a/node_modules/tslint/lib/rules/noBitwiseRule.js b/node_modules/tslint/lib/rules/noBitwiseRule.js
index cfb75db1d..0d9d7ff85 100644
--- a/node_modules/tslint/lib/rules/noBitwiseRule.js
+++ b/node_modules/tslint/lib/rules/noBitwiseRule.js
@@ -27,22 +27,22 @@ var Rule = (function (_super) {
Rule.prototype.apply = function (sourceFile) {
return this.applyWithFunction(sourceFile, walk);
};
+ /* tslint:disable:object-literal-sort-keys */
+ Rule.metadata = {
+ ruleName: "no-bitwise",
+ description: "Disallows bitwise operators.",
+ descriptionDetails: (_a = ["\n Specifically, the following bitwise operators are banned:\n `&`, `&=`, `|`, `|=`,\n `^`, `^=`, `<<`, `<<=`,\n `>>`, `>>=`, `>>>`, `>>>=`, and `~`.\n This rule does not ban the use of `&` and `|` for intersection and union types."], _a.raw = ["\n Specifically, the following bitwise operators are banned:\n \\`&\\`, \\`&=\\`, \\`|\\`, \\`|=\\`,\n \\`^\\`, \\`^=\\`, \\`<<\\`, \\`<<=\\`,\n \\`>>\\`, \\`>>=\\`, \\`>>>\\`, \\`>>>=\\`, and \\`~\\`.\n This rule does not ban the use of \\`&\\` and \\`|\\` for intersection and union types."], Lint.Utils.dedent(_a)),
+ rationale: (_b = ["\n Bitwise operators are often typos - for example `bool1 & bool2` instead of `bool1 && bool2`.\n They also can be an indicator of overly clever code which decreases maintainability."], _b.raw = ["\n Bitwise operators are often typos - for example \\`bool1 & bool2\\` instead of \\`bool1 && bool2\\`.\n They also can be an indicator of overly clever code which decreases maintainability."], Lint.Utils.dedent(_b)),
+ optionsDescription: "Not configurable.",
+ options: null,
+ optionExamples: [true],
+ type: "functionality",
+ typescriptOnly: false,
+ };
+ /* tslint:enable:object-literal-sort-keys */
+ Rule.FAILURE_STRING = "Forbidden bitwise operation";
return Rule;
}(Lint.Rules.AbstractRule));
-/* tslint:disable:object-literal-sort-keys */
-Rule.metadata = {
- ruleName: "no-bitwise",
- description: "Disallows bitwise operators.",
- descriptionDetails: (_a = ["\n Specifically, the following bitwise operators are banned:\n `&`, `&=`, `|`, `|=`,\n `^`, `^=`, `<<`, `<<=`,\n `>>`, `>>=`, `>>>`, `>>>=`, and `~`.\n This rule does not ban the use of `&` and `|` for intersection and union types."], _a.raw = ["\n Specifically, the following bitwise operators are banned:\n \\`&\\`, \\`&=\\`, \\`|\\`, \\`|=\\`,\n \\`^\\`, \\`^=\\`, \\`<<\\`, \\`<<=\\`,\n \\`>>\\`, \\`>>=\\`, \\`>>>\\`, \\`>>>=\\`, and \\`~\\`.\n This rule does not ban the use of \\`&\\` and \\`|\\` for intersection and union types."], Lint.Utils.dedent(_a)),
- rationale: (_b = ["\n Bitwise operators are often typos - for example `bool1 & bool2` instead of `bool1 && bool2`.\n They also can be an indicator of overly clever code which decreases maintainability."], _b.raw = ["\n Bitwise operators are often typos - for example \\`bool1 & bool2\\` instead of \\`bool1 && bool2\\`.\n They also can be an indicator of overly clever code which decreases maintainability."], Lint.Utils.dedent(_b)),
- optionsDescription: "Not configurable.",
- options: null,
- optionExamples: [true],
- type: "functionality",
- typescriptOnly: false,
-};
-/* tslint:enable:object-literal-sort-keys */
-Rule.FAILURE_STRING = "Forbidden bitwise operation";
exports.Rule = Rule;
function walk(ctx) {
return ts.forEachChild(ctx.sourceFile, function cb(node) {