From bbff7403fbf46f9ad92240ac213df8d30ef31b64 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 20 Sep 2018 02:56:13 +0200 Subject: update packages --- node_modules/tslint/lib/rules/oneLineRule.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'node_modules/tslint/lib/rules/oneLineRule.js') diff --git a/node_modules/tslint/lib/rules/oneLineRule.js b/node_modules/tslint/lib/rules/oneLineRule.js index 5d271ae91..1d0dccf92 100644 --- a/node_modules/tslint/lib/rules/oneLineRule.js +++ b/node_modules/tslint/lib/rules/oneLineRule.js @@ -43,7 +43,7 @@ var Rule = /** @class */ (function (_super) { Rule.metadata = { ruleName: "one-line", description: "Requires the specified tokens to be on the same line as the expression preceding them.", - optionsDescription: (_a = ["\n Five arguments may be optionally provided:\n\n * `\"", "\"` checks that `catch` is on the same line as the closing brace for `try`.\n * `\"", "\"` checks that `finally` is on the same line as the closing brace for `catch`.\n * `\"", "\"` checks that `else` is on the same line as the closing brace for `if`.\n * `\"", "\"` checks that an open brace falls on the same line as its preceding expression.\n * `\"", "\"` checks preceding whitespace for the specified tokens."], _a.raw = ["\n Five arguments may be optionally provided:\n\n * \\`\"", "\"\\` checks that \\`catch\\` is on the same line as the closing brace for \\`try\\`.\n * \\`\"", "\"\\` checks that \\`finally\\` is on the same line as the closing brace for \\`catch\\`.\n * \\`\"", "\"\\` checks that \\`else\\` is on the same line as the closing brace for \\`if\\`.\n * \\`\"", "\"\\` checks that an open brace falls on the same line as its preceding expression.\n * \\`\"", "\"\\` checks preceding whitespace for the specified tokens."], Lint.Utils.dedent(_a, OPTION_CATCH, OPTION_FINALLY, OPTION_ELSE, OPTION_BRACE, OPTION_WHITESPACE)), + optionsDescription: Lint.Utils.dedent(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n Five arguments may be optionally provided:\n\n * `\"", "\"` checks that `catch` is on the same line as the closing brace for `try`.\n * `\"", "\"` checks that `finally` is on the same line as the closing brace for `catch`.\n * `\"", "\"` checks that `else` is on the same line as the closing brace for `if`.\n * `\"", "\"` checks that an open brace falls on the same line as its preceding expression.\n * `\"", "\"` checks preceding whitespace for the specified tokens."], ["\n Five arguments may be optionally provided:\n\n * \\`\"", "\"\\` checks that \\`catch\\` is on the same line as the closing brace for \\`try\\`.\n * \\`\"", "\"\\` checks that \\`finally\\` is on the same line as the closing brace for \\`catch\\`.\n * \\`\"", "\"\\` checks that \\`else\\` is on the same line as the closing brace for \\`if\\`.\n * \\`\"", "\"\\` checks that an open brace falls on the same line as its preceding expression.\n * \\`\"", "\"\\` checks preceding whitespace for the specified tokens."])), OPTION_CATCH, OPTION_FINALLY, OPTION_ELSE, OPTION_BRACE, OPTION_WHITESPACE), options: { type: "array", items: { @@ -89,7 +89,10 @@ var OneLineWalker = /** @class */ (function (_super) { case ts.SyntaxKind.InterfaceDeclaration: case ts.SyntaxKind.ClassDeclaration: case ts.SyntaxKind.ClassExpression: { - _this.check(tsutils_1.getChildOfKind(node, ts.SyntaxKind.OpenBraceToken, sourceFile)); + var openBrace = tsutils_1.getChildOfKind(node, ts.SyntaxKind.OpenBraceToken, sourceFile); + if (openBrace !== undefined) { + _this.check(openBrace); + } break; } case ts.SyntaxKind.IfStatement: { @@ -148,4 +151,4 @@ var OneLineWalker = /** @class */ (function (_super) { }; return OneLineWalker; }(Lint.AbstractWalker)); -var _a; +var templateObject_1; -- cgit v1.2.3