Skip to content

Commit 59ae2ff

Browse files
committed
Fix object whitespace lints
1 parent 1c5d834 commit 59ae2ff

4 files changed

Lines changed: 16 additions & 16 deletions

File tree

Gulpfile.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ for (const i in libraryTargets) {
226226
gulp.task(target, false, [], function() {
227227
return gulp.src(sources)
228228
.pipe(newer(target))
229-
.pipe(concat(target, {newLine: ""}))
229+
.pipe(concat(target, { newLine: "" }))
230230
.pipe(gulp.dest("."));
231231
});
232232
}
@@ -577,7 +577,7 @@ gulp.task(run, false, [servicesFile], () => {
577577
.pipe(newer(run))
578578
.pipe(sourcemaps.init())
579579
.pipe(tsc(settings))
580-
.pipe(sourcemaps.write(".", {includeContent: false, sourceRoot: "../../"}))
580+
.pipe(sourcemaps.write(".", { includeContent: false, sourceRoot: "../../" }))
581581
.pipe(gulp.dest("."));
582582
});
583583

@@ -743,7 +743,7 @@ gulp.task("runtests",
743743
const nodeServerOutFile = "tests/webTestServer.js";
744744
const nodeServerInFile = "tests/webTestServer.ts";
745745
gulp.task(nodeServerOutFile, false, [servicesFile], () => {
746-
const settings: tsc.Settings = getCompilerSettings({module: "commonjs"}, /*useBuiltCompiler*/ true);
746+
const settings: tsc.Settings = getCompilerSettings({ module: "commonjs" }, /*useBuiltCompiler*/ true);
747747
return gulp.src(nodeServerInFile)
748748
.pipe(newer(nodeServerOutFile))
749749
.pipe(sourcemaps.init())
@@ -768,7 +768,7 @@ gulp.task("browserify", "Runs browserify on run.js to produce a file suitable fo
768768
next(undefined, file);
769769
});
770770
}))
771-
.pipe(sourcemaps.write(".", {includeContent: false, sourceRoot: "../../"}))
771+
.pipe(sourcemaps.write(".", { includeContent: false, sourceRoot: "../../" }))
772772
.pipe(gulp.dest("."));
773773
});
774774

@@ -966,7 +966,7 @@ const tslintRulesFiles = tslintRules.map(function(p) {
966966
const tslintRulesOutFiles = tslintRules.map(function(p, i) {
967967
const pathname = path.join(builtLocalDirectory, "tslint", p + ".js");
968968
gulp.task(pathname, false, [], () => {
969-
const settings: tsc.Settings = getCompilerSettings({module: "commonjs"}, /*useBuiltCompiler*/ false);
969+
const settings: tsc.Settings = getCompilerSettings({ module: "commonjs" }, /*useBuiltCompiler*/ false);
970970
return gulp.src(tslintRulesFiles[i])
971971
.pipe(newer(pathname))
972972
.pipe(sourcemaps.init())

src/server/session.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1123,7 +1123,7 @@ namespace ts.server {
11231123
[CommandNames.Reload]: (request: protocol.Request) => {
11241124
const reloadArgs = <protocol.ReloadRequestArgs>request.arguments;
11251125
this.reload(reloadArgs.file, reloadArgs.tmpfile, request.seq);
1126-
return {response: { reloadFinished: true }, responseRequired: true};
1126+
return { response: { reloadFinished: true }, responseRequired: true };
11271127
},
11281128
[CommandNames.Saveto]: (request: protocol.Request) => {
11291129
const savetoArgs = <protocol.SavetoRequestArgs>request.arguments;

tests/cases/unittests/moduleResolution.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ import b = require("./moduleB.ts");
589589
const file1: File = { name: "/root/folder1/file1.ts" };
590590
const file2: File = { name: "/root/generated/folder1/file2.ts" }; // load remapped file as module
591591
const file3: File = { name: "/root/generated/folder2/file3/index.d.ts" }; // load folder a module
592-
const file4Typings: File = { name: "/root/generated/folder2/file4/package.json", content: JSON.stringify({ typings: "dist/types.d.ts" })};
592+
const file4Typings: File = { name: "/root/generated/folder2/file4/package.json", content: JSON.stringify({ typings: "dist/types.d.ts" }) };
593593
const file4: File = { name: "/root/generated/folder2/file4/dist/types.d.ts" }; // load file pointed by typings
594594
const file5: File = { name: "/root/someanotherfolder/file5/index.d.ts" }; // load remapped module from folder
595595
const file6: File = { name: "/root/node_modules/file6.ts" }; // fallback to node
@@ -957,7 +957,7 @@ import b = require("./moduleB.ts");
957957
describe("Type reference directive resolution: ", () => {
958958
function test(typesRoot: string, typeDirective: string, primary: boolean, initialFile: File, targetFile: File, ...otherFiles: File[]) {
959959
const host = createModuleResolutionHost(/*hasDirectoryExists*/ false, ...[initialFile, targetFile].concat(...otherFiles));
960-
const result = resolveTypeReferenceDirective(typeDirective, initialFile.name, {typeRoots: [typesRoot]}, host);
960+
const result = resolveTypeReferenceDirective(typeDirective, initialFile.name, { typeRoots: [typesRoot] }, host);
961961
assert(result.resolvedTypeReferenceDirective.resolvedFileName !== undefined, "expected type directive to be resolved");
962962
assert.equal(result.resolvedTypeReferenceDirective.resolvedFileName, targetFile.name, "unexpected result of type reference resolution");
963963
assert.equal(result.resolvedTypeReferenceDirective.primary, primary, "unexpected 'primary' value");
@@ -972,7 +972,7 @@ import b = require("./moduleB.ts");
972972
{
973973
const f1 = { name: "/root/src/app.ts" };
974974
const f2 = { name: "/root/src/types/lib/typings/lib.d.ts" };
975-
const package = { name: "/root/src/types/lib/package.json", content: JSON.stringify({types: "typings/lib.d.ts"}) };
975+
const package = { name: "/root/src/types/lib/package.json", content: JSON.stringify({ types: "typings/lib.d.ts" }) };
976976
test(/*typesRoot*/"/root/src/types", /* typeDirective */"lib", /*primary*/ true, f1, f2, package);
977977
}
978978
{
@@ -983,7 +983,7 @@ import b = require("./moduleB.ts");
983983
{
984984
const f1 = { name: "/root/src/app.ts" };
985985
const f2 = { name: "/root/src/node_modules/lib/typings/lib.d.ts" };
986-
const package = { name: "/root/src/node_modules/lib/package.json", content: JSON.stringify({types: "typings/lib.d.ts"}) };
986+
const package = { name: "/root/src/node_modules/lib/package.json", content: JSON.stringify({ types: "typings/lib.d.ts" }) };
987987
test(/*typesRoot*/"/root/src/types", /* typeDirective */"lib", /*primary*/ false, f1, f2, package);
988988
}
989989
{
@@ -994,7 +994,7 @@ import b = require("./moduleB.ts");
994994
{
995995
const f1 = { name: "/root/src/app.ts" };
996996
const f2 = { name: "/root/src/node_modules/@types/lib/typings/lib.d.ts" };
997-
const package = { name: "/root/src/node_modules/@types/lib/package.json", content: JSON.stringify({types: "typings/lib.d.ts"}) };
997+
const package = { name: "/root/src/node_modules/@types/lib/package.json", content: JSON.stringify({ types: "typings/lib.d.ts" }) };
998998
test(/*typesRoot*/"/root/src/types", /* typeDirective */"lib", /*primary*/ false, f1, f2, package);
999999
}
10001000
});
@@ -1012,7 +1012,7 @@ import b = require("./moduleB.ts");
10121012
{
10131013
const f1 = { name: "/root/src/app.ts" };
10141014
const f2 = { name: "/root/node_modules/lib/typings/lib.d.ts" };
1015-
const package = { name: "/root/node_modules/lib/package.json", content: JSON.stringify({typings: "typings/lib.d.ts"}) };
1015+
const package = { name: "/root/node_modules/lib/package.json", content: JSON.stringify({ typings: "typings/lib.d.ts" }) };
10161016
test(/*typesRoot*/"/root/src/types", /* typeDirective */"lib", /*primary*/ false, f1, f2, package);
10171017
}
10181018
{
@@ -1023,7 +1023,7 @@ import b = require("./moduleB.ts");
10231023
{
10241024
const f1 = { name: "/root/src/app.ts" };
10251025
const f2 = { name: "/root/node_modules/@types/lib/typings/lib.d.ts" };
1026-
const package = { name: "/root/node_modules/@types/lib/package.json", content: JSON.stringify({typings: "typings/lib.d.ts"}) };
1026+
const package = { name: "/root/node_modules/@types/lib/package.json", content: JSON.stringify({ typings: "typings/lib.d.ts" }) };
10271027
test(/*typesRoot*/"/root/src/types", /* typeDirective */"lib", /*primary*/ false, f1, f2, package);
10281028
}
10291029
});

tests/cases/unittests/session.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ namespace ts.server {
170170

171171
describe("send", () => {
172172
it("is an overrideable handle which sends protocol messages over the wire", () => {
173-
const msg = {seq: 0, type: "none"};
173+
const msg = { seq: 0, type: "none" };
174174
const strmsg = JSON.stringify(msg);
175175
const len = 1 + Utils.byteLength(strmsg, "utf8");
176176
const resultMsg = `Content-Length: ${len}\r\n\r\n${strmsg}\n`;
@@ -266,7 +266,7 @@ namespace ts.server {
266266
constructor() {
267267
super(mockHost, Utils.byteLength, process.hrtime, mockLogger);
268268
this.addProtocolHandler(this.customHandler, () => {
269-
return {response: undefined, responseRequired: true};
269+
return { response: undefined, responseRequired: true };
270270
});
271271
}
272272
send(msg: protocol.Message) {
@@ -340,7 +340,7 @@ namespace ts.server {
340340
handleRequest(msg: protocol.Request) {
341341
let response: protocol.Response;
342342
try {
343-
({response} = this.executeCommand(msg));
343+
({ response } = this.executeCommand(msg));
344344
}
345345
catch (e) {
346346
this.output(undefined, msg.command, msg.seq, e.toString());

0 commit comments

Comments
 (0)