Skip to content

Commit 2d3e943

Browse files
committed
JS style changes
1 parent 381c026 commit 2d3e943

1 file changed

Lines changed: 25 additions & 25 deletions

File tree

Jakefile.js

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -187,20 +187,20 @@ var harnessSources = harnessCoreSources.concat([
187187
"protocol.d.ts",
188188
"session.ts",
189189
"client.ts",
190-
"editorServices.ts",
190+
"editorServices.ts"
191191
].map(function (f) {
192192
return path.join(serverDirectory, f);
193193
}));
194194

195195
var librarySourceMap = [
196196
{ target: "lib.core.d.ts", sources: ["header.d.ts", "core.d.ts"] },
197-
{ target: "lib.dom.d.ts", sources: ["importcore.d.ts", "intl.d.ts", "dom.generated.d.ts"], },
198-
{ target: "lib.webworker.d.ts", sources: ["importcore.d.ts", "intl.d.ts", "webworker.generated.d.ts"], },
199-
{ target: "lib.scriptHost.d.ts", sources: ["importcore.d.ts", "scriptHost.d.ts"], },
200-
{ target: "lib.d.ts", sources: ["header.d.ts", "core.d.ts", "intl.d.ts", "dom.generated.d.ts", "webworker.importscripts.d.ts", "scriptHost.d.ts"], },
201-
{ target: "lib.core.es6.d.ts", sources: ["header.d.ts", "core.d.ts", "es6.d.ts"]},
197+
{ target: "lib.dom.d.ts", sources: ["importcore.d.ts", "intl.d.ts", "dom.generated.d.ts"] },
198+
{ target: "lib.webworker.d.ts", sources: ["importcore.d.ts", "intl.d.ts", "webworker.generated.d.ts"] },
199+
{ target: "lib.scriptHost.d.ts", sources: ["importcore.d.ts", "scriptHost.d.ts"] },
200+
{ target: "lib.d.ts", sources: ["header.d.ts", "core.d.ts", "intl.d.ts", "dom.generated.d.ts", "webworker.importscripts.d.ts", "scriptHost.d.ts"] },
201+
{ target: "lib.core.es6.d.ts", sources: ["header.d.ts", "core.d.ts", "es6.d.ts"] },
202202
{ target: "lib.es6.d.ts", sources: ["header.d.ts", "es6.d.ts", "core.d.ts", "intl.d.ts", "dom.generated.d.ts", "dom.es6.d.ts", "webworker.importscripts.d.ts", "scriptHost.d.ts"] },
203-
{ target: "lib.core.es7.d.ts", sources: ["header.d.ts", "core.d.ts", "es6.d.ts", "es7.d.ts"]},
203+
{ target: "lib.core.es7.d.ts", sources: ["header.d.ts", "core.d.ts", "es6.d.ts", "es7.d.ts"] },
204204
{ target: "lib.es7.d.ts", sources: ["header.d.ts", "es6.d.ts", "es7.d.ts", "core.d.ts", "intl.d.ts", "dom.generated.d.ts", "dom.es6.d.ts", "webworker.importscripts.d.ts", "scriptHost.d.ts"] }
205205
];
206206

@@ -242,7 +242,7 @@ function concatenateFiles(destinationFile, sourceFiles) {
242242
}
243243

244244
var useDebugMode = true;
245-
var host = (process.env.host || process.env.TYPESCRIPT_HOST || "node");
245+
var host = process.env.host || process.env.TYPESCRIPT_HOST || "node";
246246
var compilerFilename = "tsc.js";
247247
var LKGCompiler = path.join(LKGDirectory, compilerFilename);
248248
var builtLocalCompiler = path.join(builtLocalDirectory, compilerFilename);
@@ -291,7 +291,7 @@ function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, opts
291291
options += " --out " + outFile;
292292
}
293293
else {
294-
options += " --module commonjs"
294+
options += " --module commonjs";
295295
}
296296

297297
if(opts.noResolve) {
@@ -306,7 +306,7 @@ function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, opts
306306
}
307307

308308
if (opts.stripInternal) {
309-
options += " --stripInternal"
309+
options += " --stripInternal";
310310
}
311311

312312
if (useBuiltCompiler && !/^(no?|f(alse)?|0|-)$/i.test(process.env.USE_TRANSFORMS)) {
@@ -448,9 +448,9 @@ file(scriptsTsdJson);
448448

449449
task("tsd-scripts", [scriptsTsdJson], function () {
450450
var cmd = "tsd --config " + scriptsTsdJson + " install";
451-
console.log(cmd)
451+
console.log(cmd);
452452
exec(cmd);
453-
}, { async: true })
453+
}, { async: true });
454454

455455
var importDefinitelyTypedTestsDirectory = path.join(scriptsDirectory, "importDefinitelyTypedTests");
456456
var importDefinitelyTypedTestsJs = path.join(importDefinitelyTypedTestsDirectory, "importDefinitelyTypedTests.js");
@@ -617,7 +617,7 @@ directory(builtLocalDirectory);
617617
var run = path.join(builtLocalDirectory, "run.js");
618618
compileFile(run, harnessSources, [builtLocalDirectory, tscFile].concat(libraryTargets).concat(harnessSources), [], /*useBuiltCompiler:*/ true);
619619

620-
var internalTests = "internal/"
620+
var internalTests = "internal/";
621621

622622
var localBaseline = "tests/baselines/local/";
623623
var refBaseline = "tests/baselines/reference/";
@@ -845,15 +845,15 @@ function runConsoleTests(defaultReporter, defaultSubsets) {
845845
testTimeout = 100000;
846846
}
847847

848-
colors = process.env.colors || process.env.color
848+
colors = process.env.colors || process.env.color;
849849
colors = colors ? ' --no-colors ' : ' --colors ';
850850
reporter = process.env.reporter || process.env.r || defaultReporter;
851851

852852
// timeout normally isn't necessary but Travis-CI has been timing out on compiler baselines occasionally
853853
// default timeout is 2sec which really should be enough, but maybe we just need a small amount longer
854854
var subsetRegexes;
855855
if(defaultSubsets.length === 0) {
856-
subsetRegexes = [tests]
856+
subsetRegexes = [tests];
857857
}
858858
else {
859859
var subsets = tests ? tests.split("|") : defaultSubsets;
@@ -903,8 +903,8 @@ task("generate-code-coverage", ["tests", builtLocalDirectory], function () {
903903
}, { async: true });
904904

905905
// Browser tests
906-
var nodeServerOutFile = 'tests/webTestServer.js'
907-
var nodeServerInFile = 'tests/webTestServer.ts'
906+
var nodeServerOutFile = 'tests/webTestServer.js';
907+
var nodeServerInFile = 'tests/webTestServer.ts';
908908
compileFile(nodeServerOutFile, [nodeServerInFile], [builtLocalDirectory, tscFile], [], /*useBuiltCompiler:*/ true, { noOutFile: true });
909909

910910
desc("Runs browserify on run.js to produce a file suitable for running tests in the browser");
@@ -916,7 +916,7 @@ task("browserify", ["tests", builtLocalDirectory, nodeServerOutFile], function()
916916
desc("Runs the tests using the built run.js file like 'jake runtests'. Syntax is jake runtests-browser. Additional optional parameters tests=[regex], port=, browser=[chrome|IE]");
917917
task("runtests-browser", ["tests", "browserify", builtLocalDirectory, servicesFileInBrowserTest], function() {
918918
cleanTestDirs();
919-
host = "node"
919+
host = "node";
920920
port = process.env.port || process.env.p || '8888';
921921
browser = process.env.browser || process.env.b || "IE";
922922
tests = process.env.test || process.env.tests || process.env.t;
@@ -930,13 +930,13 @@ task("runtests-browser", ["tests", "browserify", builtLocalDirectory, servicesFi
930930
}
931931

932932
tests = tests ? tests : '';
933-
var cmd = host + " tests/webTestServer.js " + port + " " + browser + " " + tests
933+
var cmd = host + " tests/webTestServer.js " + port + " " + browser + " " + tests;
934934
console.log(cmd);
935935
exec(cmd);
936936
}, {async: true});
937937

938938
function getDiffTool() {
939-
var program = process.env['DIFF']
939+
var program = process.env['DIFF'];
940940
if (!program) {
941941
fail("Add the 'DIFF' environment variable to the path of the program you want to use.");
942942
}
@@ -965,11 +965,11 @@ task("tests-debug", ["setDebugMode", "tests"]);
965965
// Makes the test results the new baseline
966966
desc("Makes the most recent test results the new baseline, overwriting the old baseline");
967967
task("baseline-accept", function(hardOrSoft) {
968-
if (!hardOrSoft || hardOrSoft == "hard") {
968+
if (!hardOrSoft || hardOrSoft === "hard") {
969969
jake.rmRf(refBaseline);
970970
fs.renameSync(localBaseline, refBaseline);
971971
}
972-
else if (hardOrSoft == "soft") {
972+
else if (hardOrSoft === "soft") {
973973
var files = jake.readdirR(localBaseline);
974974
for (var i in files) {
975975
jake.cpR(files[i], refBaseline);
@@ -1048,15 +1048,15 @@ task("update-sublime", ["local", serverFile], function() {
10481048
});
10491049

10501050
var tslintRuleDir = "scripts/tslint";
1051-
var tslintRules = ([
1051+
var tslintRules = [
10521052
"nextLineRule",
10531053
"noNullRule",
10541054
"preferConstRule",
10551055
"booleanTriviaRule",
10561056
"typeOperatorSpacingRule",
10571057
"noInOperatorRule",
10581058
"noIncrementDecrementRule"
1059-
]);
1059+
];
10601060
var tslintRulesFiles = tslintRules.map(function(p) {
10611061
return path.join(tslintRuleDir, p + ".ts");
10621062
});
@@ -1081,7 +1081,7 @@ function getLinterOptions() {
10811081

10821082
function lintFileContents(options, path, contents) {
10831083
var ll = new Linter(path, contents, options);
1084-
console.log("Linting '" + path + "'.")
1084+
console.log("Linting '" + path + "'.");
10851085
return ll.lint();
10861086
}
10871087

0 commit comments

Comments
 (0)