Enable "space-within-parens" lint rule (#18856)

This commit is contained in:
Andy 2017-10-02 08:36:26 -07:00 committed by GitHub
parent d821bbf3f3
commit b883fcbfdd
4 changed files with 4 additions and 3 deletions

View File

@ -378,7 +378,7 @@ namespace ts {
const catchVariable = getGeneratedNameForNode(errorRecord);
const returnMethod = createTempVariable(/*recordTempVariable*/ undefined);
const callValues = createAsyncValuesHelper(context, expression, /*location*/ node.expression);
const callNext = createCall(createPropertyAccess(iterator, "next" ), /*typeArguments*/ undefined, []);
const callNext = createCall(createPropertyAccess(iterator, "next"), /*typeArguments*/ undefined, []);
const getDone = createPropertyAccess(result, "done");
const getValue = createPropertyAccess(result, "value");
const callReturn = createFunctionCall(returnMethod, iterator, []);

View File

@ -64,7 +64,7 @@ namespace ts {
const rootScriptInfo = projectService.getOrCreateScriptInfo(rootFile, /* openedByClient */ true, /*containingProject*/ undefined);
const project = projectService.createInferredProjectWithRootFileIfNecessary(rootScriptInfo);
project.setCompilerOptions({ module: ts.ModuleKind.AMD, noLib: true } );
project.setCompilerOptions({ module: ts.ModuleKind.AMD, noLib: true });
return {
project,
rootScriptInfo

View File

@ -162,7 +162,7 @@ interface Math {
* If any argument is NaN, the result is NaN.
* If all arguments are either +0 or 0, the result is +0.
*/
hypot(...values: number[] ): number;
hypot(...values: number[]): number;
/**
* Returns the integral part of the a numeric expression, x, removing any fractional digits.

View File

@ -41,6 +41,7 @@
"avoid-escape"
],
"semicolon": [true, "always", "ignore-bound-class-methods"],
"space-within-parens": true,
"triple-equals": true,
"type-operator-spacing": true,
"typedef-whitespace": [