Skip to content

Commit b883fcb

Browse files
author
Andy
authored
Enable "space-within-parens" lint rule (microsoft#18856)
1 parent d821bbf commit b883fcb

4 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/compiler/transformers/esnext.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ namespace ts {
378378
const catchVariable = getGeneratedNameForNode(errorRecord);
379379
const returnMethod = createTempVariable(/*recordTempVariable*/ undefined);
380380
const callValues = createAsyncValuesHelper(context, expression, /*location*/ node.expression);
381-
const callNext = createCall(createPropertyAccess(iterator, "next" ), /*typeArguments*/ undefined, []);
381+
const callNext = createCall(createPropertyAccess(iterator, "next"), /*typeArguments*/ undefined, []);
382382
const getDone = createPropertyAccess(result, "done");
383383
const getValue = createPropertyAccess(result, "value");
384384
const callReturn = createFunctionCall(returnMethod, iterator, []);

src/harness/unittests/cachingInServerLSHost.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ namespace ts {
6464
const rootScriptInfo = projectService.getOrCreateScriptInfo(rootFile, /* openedByClient */ true, /*containingProject*/ undefined);
6565

6666
const project = projectService.createInferredProjectWithRootFileIfNecessary(rootScriptInfo);
67-
project.setCompilerOptions({ module: ts.ModuleKind.AMD, noLib: true } );
67+
project.setCompilerOptions({ module: ts.ModuleKind.AMD, noLib: true });
6868
return {
6969
project,
7070
rootScriptInfo

src/lib/es2015.core.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ interface Math {
162162
* If any argument is NaN, the result is NaN.
163163
* If all arguments are either +0 or −0, the result is +0.
164164
*/
165-
hypot(...values: number[] ): number;
165+
hypot(...values: number[]): number;
166166

167167
/**
168168
* Returns the integral part of the a numeric expression, x, removing any fractional digits.

tslint.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"avoid-escape"
4242
],
4343
"semicolon": [true, "always", "ignore-bound-class-methods"],
44+
"space-within-parens": true,
4445
"triple-equals": true,
4546
"type-operator-spacing": true,
4647
"typedef-whitespace": [

0 commit comments

Comments
 (0)