Skip to content
This repository was archived by the owner on Jun 5, 2020. It is now read-only.

Commit 5315cb3

Browse files
committed
Allow specifying onlyTestTsNext
Also make this the default for run-clone. Also clean up lint config.
1 parent 64f8399 commit 5315cb3

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "",
55
"scripts": {
66
"build": "tsc",
7-
"run-clone": "node ./bin/index.js --clone",
7+
"run-clone": "node ./bin/index.js --clone --onlyTestTsNext",
88
"lint": "tslint --project tsconfig.json --format stylish"
99
},
1010
"license": "MIT",

src/index.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,15 @@ const pathToDtsLint = require.resolve("dtslint");
99
if (module.parent === null) { // tslint:disable-line no-null-keyword
1010
let clone = false;
1111
let noInstall = false;
12+
let onlyTestTsNext = false;
1213
let nProcesses = cpus().length;
1314
const { argv } = process;
1415
for (let i = 2; i < argv.length; i++) {
1516
const arg = argv[i];
1617
switch (arg) {
18+
case "--onlyTestTsNext":
19+
onlyTestTsNext = true;
20+
break;
1721
case "--clone":
1822
clone = true;
1923
break;
@@ -32,7 +36,7 @@ if (module.parent === null) { // tslint:disable-line no-null-keyword
3236
}
3337
}
3438

35-
main(clone, nProcesses, noInstall)
39+
main(clone, nProcesses, noInstall, onlyTestTsNext)
3640
.then(code => {
3741
if (code !== 0) {
3842
console.error("FAILED");
@@ -45,7 +49,7 @@ if (module.parent === null) { // tslint:disable-line no-null-keyword
4549
});
4650
}
4751

48-
async function main(clone: boolean, nProcesses: number, noInstall: boolean): Promise<number> {
52+
async function main(clone: boolean, nProcesses: number, noInstall: boolean, onlyTestTsNext: boolean): Promise<number> {
4953
if (clone && !noInstall) {
5054
await remove(joinPaths(process.cwd(), "DefinitelyTyped"));
5155
await cloneDt(process.cwd());
@@ -67,7 +71,7 @@ async function main(clone: boolean, nProcesses: number, noInstall: boolean): Pro
6771
const allFailures: Array<[string, string]> = [];
6872

6973
await runWithListeningChildProcesses({
70-
inputs: allPackages.map(path => ({ path, onlyTestTsNext: false })),
74+
inputs: allPackages.map(path => ({ path, onlyTestTsNext })),
7175
commandLineArgs: ["--listen"],
7276
workerFile: pathToDtsLint,
7377
nProcesses,

tslint.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
"rules": {
44
"arrow-parens": [true, "ban-single-arg-parens"],
55
"comment-format": [true, "check-space"],
6-
"indent": [true, "tabs"],
6+
"indent": [true, "spaces"],
7+
"increment-decrement": false,
8+
"radix": false,
79
"only-arrow-functions": [true, "allow-declarations"],
810
"typedef": [true, "call-signature"],
911

@@ -20,4 +22,4 @@
2022
"promise-function-async": false,
2123
"type-literal-delimiter": false
2224
}
23-
}
25+
}

0 commit comments

Comments
 (0)