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/whitespaceRule.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'node_modules/tslint/lib/rules/whitespaceRule.js') diff --git a/node_modules/tslint/lib/rules/whitespaceRule.js b/node_modules/tslint/lib/rules/whitespaceRule.js index baae7ec33..b39159eb3 100644 --- a/node_modules/tslint/lib/rules/whitespaceRule.js +++ b/node_modules/tslint/lib/rules/whitespaceRule.js @@ -43,7 +43,7 @@ var Rule = /** @class */ (function (_super) { ruleName: "whitespace", description: "Enforces whitespace style conventions.", rationale: "Helps maintain a readable, consistent style in your codebase.", - optionsDescription: (_a = ["\n Ten arguments may be optionally provided:\n\n * `\"check-branch\"` checks branching statements (`if`/`else`/`for`/`while`) are followed by whitespace.\n * `\"check-decl\"`checks that variable declarations have whitespace around the equals token.\n * `\"check-operator\"` checks for whitespace around operator tokens.\n * `\"check-module\"` checks for whitespace in import & export statements.\n * `\"check-separator\"` checks for whitespace after separator tokens (`,`/`;`).\n * `\"check-rest-spread\"` checks that there is no whitespace after rest/spread operator (`...`).\n * `\"check-type\"` checks for whitespace before a variable type specification.\n * `\"check-typecast\"` checks for whitespace between a typecast and its target.\n * `\"check-type-operator\"` checks for whitespace between type operators `|` and `&`.\n * `\"check-preblock\"` checks for whitespace before the opening brace of a block"], _a.raw = ["\n Ten arguments may be optionally provided:\n\n * \\`\"check-branch\"\\` checks branching statements (\\`if\\`/\\`else\\`/\\`for\\`/\\`while\\`) are followed by whitespace.\n * \\`\"check-decl\"\\`checks that variable declarations have whitespace around the equals token.\n * \\`\"check-operator\"\\` checks for whitespace around operator tokens.\n * \\`\"check-module\"\\` checks for whitespace in import & export statements.\n * \\`\"check-separator\"\\` checks for whitespace after separator tokens (\\`,\\`/\\`;\\`).\n * \\`\"check-rest-spread\"\\` checks that there is no whitespace after rest/spread operator (\\`...\\`).\n * \\`\"check-type\"\\` checks for whitespace before a variable type specification.\n * \\`\"check-typecast\"\\` checks for whitespace between a typecast and its target.\n * \\`\"check-type-operator\"\\` checks for whitespace between type operators \\`|\\` and \\`&\\`.\n * \\`\"check-preblock\"\\` checks for whitespace before the opening brace of a block"], Lint.Utils.dedent(_a)), + optionsDescription: Lint.Utils.dedent(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n Ten arguments may be optionally provided:\n\n * `\"check-branch\"` checks branching statements (`if`/`else`/`for`/`while`) are followed by whitespace.\n * `\"check-decl\"`checks that variable declarations have whitespace around the equals token.\n * `\"check-operator\"` checks for whitespace around operator tokens.\n * `\"check-module\"` checks for whitespace in import & export statements.\n * `\"check-separator\"` checks for whitespace after separator tokens (`,`/`;`).\n * `\"check-rest-spread\"` checks that there is no whitespace after rest/spread operator (`...`).\n * `\"check-type\"` checks for whitespace before a variable type specification.\n * `\"check-typecast\"` checks for whitespace between a typecast and its target.\n * `\"check-type-operator\"` checks for whitespace between type operators `|` and `&`.\n * `\"check-preblock\"` checks for whitespace before the opening brace of a block"], ["\n Ten arguments may be optionally provided:\n\n * \\`\"check-branch\"\\` checks branching statements (\\`if\\`/\\`else\\`/\\`for\\`/\\`while\\`) are followed by whitespace.\n * \\`\"check-decl\"\\`checks that variable declarations have whitespace around the equals token.\n * \\`\"check-operator\"\\` checks for whitespace around operator tokens.\n * \\`\"check-module\"\\` checks for whitespace in import & export statements.\n * \\`\"check-separator\"\\` checks for whitespace after separator tokens (\\`,\\`/\\`;\\`).\n * \\`\"check-rest-spread\"\\` checks that there is no whitespace after rest/spread operator (\\`...\\`).\n * \\`\"check-type\"\\` checks for whitespace before a variable type specification.\n * \\`\"check-typecast\"\\` checks for whitespace between a typecast and its target.\n * \\`\"check-type-operator\"\\` checks for whitespace between type operators \\`|\\` and \\`&\\`.\n * \\`\"check-preblock\"\\` checks for whitespace before the opening brace of a block"]))), options: { type: "array", items: { @@ -173,6 +173,7 @@ function walk(ctx) { } break; case ts.SyntaxKind.VariableDeclaration: + case ts.SyntaxKind.PropertyDeclaration: var _c = node, name = _c.name, type = _c.type, initializer = _c.initializer; if (options.decl && initializer !== undefined) { checkForTrailingWhitespace((type !== undefined ? type : name).getEnd()); @@ -276,7 +277,7 @@ function walk(ctx) { if (!options.operator) { return; } - var equalsGreaterThanToken = Lint.childOfKind(node, ts.SyntaxKind.EqualsGreaterThanToken); + var equalsGreaterThanToken = utils.getChildOfKind(node, ts.SyntaxKind.EqualsGreaterThanToken, sourceFile); // condition so we don't crash if the arrow is somehow missing if (equalsGreaterThanToken === undefined) { return; @@ -308,4 +309,4 @@ function walk(ctx) { ctx.addFailureAt(position, 1, Rule.FAILURE_STRING_INVALID, fix); } } -var _a; +var templateObject_1; -- cgit v1.2.3