@definitelytyped/dtslint 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/index.js +19 -9
- package/dist/index.js.map +1 -1
- package/dist/lint.d.ts +1 -1
- package/dist/lint.js +8 -6
- package/dist/lint.js.map +1 -1
- package/package.json +1 -1
- package/docs/no-relative-import-in-test.md +0 -15
- package/docs/no-single-declare-module.md +0 -19
- package/docs/strict-export-declare-modifiers.md +0 -21
- package/docs/void-return.md +0 -15
- package/src/.vscode/launch.json +0 -21
- package/src/checks.ts +0 -132
- package/src/createProgram.ts +0 -48
- package/src/index.ts +0 -290
- package/src/lint.ts +0 -182
- package/src/util.ts +0 -21
- package/test/index.test.ts +0 -121
- package/test/tsconfig.json +0 -14
- package/tsconfig.json +0 -14
- package/tsconfig.tsbuildinfo +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @definitelytyped/dtslint
|
|
2
2
|
|
|
3
|
+
## 0.1.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- bbc3c792: Skip only npm-naming in dependents
|
|
8
|
+
|
|
9
|
+
## 0.1.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 1a5fdc83: Remove test files from packages
|
|
14
|
+
- 6ff1c7bf: Require index.d.ts
|
|
15
|
+
|
|
3
16
|
## 0.1.1
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -19,6 +19,7 @@ async function main() {
|
|
|
19
19
|
let dirPath = process.cwd();
|
|
20
20
|
let onlyTestTsNext = false;
|
|
21
21
|
let expectOnly = false;
|
|
22
|
+
let skipNpmNaming = false;
|
|
22
23
|
let shouldListen = false;
|
|
23
24
|
let lookingForTsLocal = false;
|
|
24
25
|
let tsLocal;
|
|
@@ -46,6 +47,9 @@ async function main() {
|
|
|
46
47
|
case "--expectOnly":
|
|
47
48
|
expectOnly = true;
|
|
48
49
|
break;
|
|
50
|
+
case "--skipNpmNaming":
|
|
51
|
+
skipNpmNaming = true;
|
|
52
|
+
break;
|
|
49
53
|
case "--onlyTestTsNext":
|
|
50
54
|
onlyTestTsNext = true;
|
|
51
55
|
break;
|
|
@@ -76,7 +80,7 @@ async function main() {
|
|
|
76
80
|
listen(dirPath, tsLocal);
|
|
77
81
|
}
|
|
78
82
|
else {
|
|
79
|
-
await runTests(dirPath, onlyTestTsNext, expectOnly, tsLocal);
|
|
83
|
+
await runTests(dirPath, onlyTestTsNext, expectOnly, skipNpmNaming, tsLocal);
|
|
80
84
|
}
|
|
81
85
|
}
|
|
82
86
|
function usage() {
|
|
@@ -92,8 +96,8 @@ function usage() {
|
|
|
92
96
|
function listen(dirPath, tsLocal) {
|
|
93
97
|
// Don't await this here to ensure that messages sent during installation aren't dropped.
|
|
94
98
|
process.on("message", async (message) => {
|
|
95
|
-
const { path, onlyTestTsNext, expectOnly } = message;
|
|
96
|
-
runTests((0, path_1.join)(dirPath, path), onlyTestTsNext, !!expectOnly, tsLocal)
|
|
99
|
+
const { path, onlyTestTsNext, expectOnly, skipNpmNaming } = message;
|
|
100
|
+
runTests((0, path_1.join)(dirPath, path), onlyTestTsNext, !!expectOnly, !!skipNpmNaming, tsLocal)
|
|
97
101
|
.catch((e) => e.stack)
|
|
98
102
|
.then((maybeError) => {
|
|
99
103
|
process.send({ path, status: maybeError === undefined ? "OK" : maybeError });
|
|
@@ -101,7 +105,7 @@ function listen(dirPath, tsLocal) {
|
|
|
101
105
|
.catch((e) => console.error(e.stack));
|
|
102
106
|
});
|
|
103
107
|
}
|
|
104
|
-
async function runTests(dirPath, onlyTestTsNext, expectOnly, tsLocal) {
|
|
108
|
+
async function runTests(dirPath, onlyTestTsNext, expectOnly, skipNpmNaming, tsLocal) {
|
|
105
109
|
// Assert that we're really on DefinitelyTyped.
|
|
106
110
|
const dtRoot = findDTRoot(dirPath);
|
|
107
111
|
const packageName = (0, util_1.packageNameFromPath)(dirPath);
|
|
@@ -118,7 +122,7 @@ async function runTests(dirPath, onlyTestTsNext, expectOnly, tsLocal) {
|
|
|
118
122
|
const minVersion = maxVersion(packageJson.minimumTypeScriptVersion, typescript_versions_1.TypeScriptVersion.lowest);
|
|
119
123
|
if (onlyTestTsNext || tsLocal) {
|
|
120
124
|
const tsVersion = tsLocal ? "local" : typescript_versions_1.TypeScriptVersion.latest;
|
|
121
|
-
await testTypesVersion(dirPath, tsVersion, tsVersion, expectOnly, tsLocal, /*isLatest*/ true);
|
|
125
|
+
await testTypesVersion(dirPath, tsVersion, tsVersion, expectOnly, skipNpmNaming, tsLocal, /*isLatest*/ true);
|
|
122
126
|
}
|
|
123
127
|
else {
|
|
124
128
|
// For example, typesVersions of [3.2, 3.5, 3.6] will have
|
|
@@ -137,7 +141,7 @@ async function runTests(dirPath, onlyTestTsNext, expectOnly, tsLocal) {
|
|
|
137
141
|
if (lows.length > 1) {
|
|
138
142
|
console.log("testing from", low, "to", hi, "in", versionPath);
|
|
139
143
|
}
|
|
140
|
-
await testTypesVersion(versionPath, low, hi, expectOnly, undefined, isLatest);
|
|
144
|
+
await testTypesVersion(versionPath, low, hi, expectOnly, skipNpmNaming, undefined, isLatest);
|
|
141
145
|
}
|
|
142
146
|
}
|
|
143
147
|
}
|
|
@@ -151,12 +155,13 @@ function next(v) {
|
|
|
151
155
|
assert(index < typescript_versions_1.TypeScriptVersion.supported.length);
|
|
152
156
|
return typescript_versions_1.TypeScriptVersion.supported[index + 1];
|
|
153
157
|
}
|
|
154
|
-
async function testTypesVersion(dirPath, lowVersion, hiVersion, expectOnly, tsLocal, isLatest) {
|
|
158
|
+
async function testTypesVersion(dirPath, lowVersion, hiVersion, expectOnly, skipNpmNaming, tsLocal, isLatest) {
|
|
159
|
+
assertIndexdts(dirPath);
|
|
155
160
|
const tsconfigErrors = (0, checks_1.checkTsconfig)(dirPath, (0, util_1.getCompilerOptions)(dirPath));
|
|
156
161
|
if (tsconfigErrors.length > 0) {
|
|
157
162
|
throw new Error("\n\t* " + tsconfigErrors.join("\n\t* "));
|
|
158
163
|
}
|
|
159
|
-
const err = await (0, lint_1.lint)(dirPath, lowVersion, hiVersion, isLatest, expectOnly, tsLocal);
|
|
164
|
+
const err = await (0, lint_1.lint)(dirPath, lowVersion, hiVersion, isLatest, expectOnly, skipNpmNaming, tsLocal);
|
|
160
165
|
if (err) {
|
|
161
166
|
throw new Error(err);
|
|
162
167
|
}
|
|
@@ -234,7 +239,12 @@ async function assertNpmIgnoreExpected(dirPath) {
|
|
|
234
239
|
}
|
|
235
240
|
function assertNoOtherFiles(dirPath) {
|
|
236
241
|
if (fs_1.default.existsSync((0, path_1.join)(dirPath, "OTHER_FILES.txt"))) {
|
|
237
|
-
throw new Error(`${dirPath}: Should not contain 'OTHER_FILES.txt
|
|
242
|
+
throw new Error(`${dirPath}: Should not contain 'OTHER_FILES.txt'. All files matching "**/*.d.{ts,cts,mts,*.ts}" are automatically included.`);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
function assertIndexdts(dirPath) {
|
|
246
|
+
if (!fs_1.default.existsSync((0, path_1.join)(dirPath, "index.d.ts"))) {
|
|
247
|
+
throw new Error(`${dirPath}: Must contain 'index.d.ts'.`);
|
|
238
248
|
}
|
|
239
249
|
}
|
|
240
250
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;AAEA,8EAA+F;AAC/F,iCAAkC;AAClC,4CAAoB;AACpB,+BAAqE;AAErE,kDAAoD;AACpD,qCAA2D;AAC3D,iCAAyC;AACzC,iCAAiE;AACjE,kEAAkE;AAElE,KAAK,UAAU,IAAI;IACjB,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,C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AAO,EAAE,YAAY,CAAC,CAAC,EAAE;QACpD,MAAM,IAAI,KAAK,CAAC,GAAG,OAAO,8BAA8B,CAAC,CAAC;KAC3D;AACH,CAAC"}
|
package/dist/lint.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TypeScriptVersion } from "@definitelytyped/typescript-versions";
|
|
2
2
|
import * as TsType from "typescript";
|
|
3
|
-
export declare function lint(dirPath: string, minVersion: TsVersion, maxVersion: TsVersion, isLatest: boolean, expectOnly: boolean, tsLocal: string | undefined): Promise<string | undefined>;
|
|
3
|
+
export declare function lint(dirPath: string, minVersion: TsVersion, maxVersion: TsVersion, isLatest: boolean, expectOnly: boolean, skipNpmNaming: boolean, tsLocal: string | undefined): Promise<string | undefined>;
|
|
4
4
|
export declare function isExternalDependency(file: TsType.SourceFile, dirPath: string, program: TsType.Program): boolean;
|
|
5
5
|
export type TsVersion = TypeScriptVersion | "local";
|
package/dist/lint.js
CHANGED
|
@@ -7,7 +7,7 @@ const assert = require("assert");
|
|
|
7
7
|
const path_1 = require("path");
|
|
8
8
|
const eslint_1 = require("eslint");
|
|
9
9
|
const createProgram_1 = require("./createProgram");
|
|
10
|
-
async function lint(dirPath, minVersion, maxVersion, isLatest, expectOnly, tsLocal) {
|
|
10
|
+
async function lint(dirPath, minVersion, maxVersion, isLatest, expectOnly, skipNpmNaming, tsLocal) {
|
|
11
11
|
const tsconfigPath = (0, path_1.join)(dirPath, "tsconfig.json");
|
|
12
12
|
const estree = require(require.resolve("@typescript-eslint/typescript-estree", { paths: [dirPath] }));
|
|
13
13
|
process.env.TSESTREE_SINGLE_RUN = "true";
|
|
@@ -32,7 +32,7 @@ async function lint(dirPath, minVersion, maxVersion, isLatest, expectOnly, tsLoc
|
|
|
32
32
|
files.push(fileName);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
const options = getEslintOptions(expectOnly, minVersion, maxVersion, tsLocal);
|
|
35
|
+
const options = getEslintOptions(expectOnly, skipNpmNaming, minVersion, maxVersion, tsLocal);
|
|
36
36
|
const eslint = new eslint_1.ESLint(options);
|
|
37
37
|
const formatter = await eslint.loadFormatter("stylish");
|
|
38
38
|
const results = await eslint.lintFiles(files);
|
|
@@ -41,7 +41,7 @@ async function lint(dirPath, minVersion, maxVersion, isLatest, expectOnly, tsLoc
|
|
|
41
41
|
return output;
|
|
42
42
|
}
|
|
43
43
|
exports.lint = lint;
|
|
44
|
-
function getEslintOptions(expectOnly, minVersion, maxVersion, tsLocal) {
|
|
44
|
+
function getEslintOptions(expectOnly, skipNpmNaming, minVersion, maxVersion, tsLocal) {
|
|
45
45
|
const versionsToTest = range(minVersion, maxVersion).map((versionName) => ({
|
|
46
46
|
versionName,
|
|
47
47
|
path: (0, utils_1.typeScriptPath)(versionName, tsLocal),
|
|
@@ -77,9 +77,11 @@ function getEslintOptions(expectOnly, minVersion, maxVersion, tsLocal) {
|
|
|
77
77
|
overrides: [
|
|
78
78
|
{
|
|
79
79
|
files: allFiles,
|
|
80
|
-
rules:
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
rules: skipNpmNaming
|
|
81
|
+
? {}
|
|
82
|
+
: {
|
|
83
|
+
"@definitelytyped/npm-naming": "error",
|
|
84
|
+
},
|
|
83
85
|
},
|
|
84
86
|
],
|
|
85
87
|
},
|
package/dist/lint.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lint.js","sourceRoot":"","sources":["../src/lint.ts"],"names":[],"mappings":";;;AAAA,8EAAyE;AACzE,kDAAsE;AACtE,iCAAkC;AAClC,+BAAoD;AACpD,mCAAgC;AAGhC,mDAAgD;AAEzC,KAAK,UAAU,IAAI,CACxB,OAAe,EACf,UAAqB,EACrB,UAAqB,EACrB,QAAiB,EACjB,UAAmB,EACnB,OAA2B;IAE3B,MAAM,YAAY,GAAG,IAAA,WAAS,EAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IACzD,MAAM,MAAM,GAAG,OAAO,CACpB,OAAO,CA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QAC3C,MAAM,CAAC,UAAU,KAAK,uCAAiB,CAAC,MAAM,CAAC,CAAC;QAChD,OAAO,CAAC,uCAAiB,CAAC,MAAM,CAAC,CAAC;KACnC;IACD,MAAM,CAAC,UAAU,KAAK,OAAO,CAAC,CAAC;IAE/B,MAAM,MAAM,GAAG,uCAAiB,CAAC,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAC/D,MAAM,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;IACpB,IAAI,UAAU,KAAK,uCAAiB,CAAC,MAAM,EAAE;QAC3C,OAAO,CAAC,GAAG,uCAAiB,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,uCAAiB,CAAC,MAAM,CAAC,CAAC;KACjF;IACD,MAAM,MAAM,GAAG,uCAAiB,CAAC,SAAS,CAAC,OAAO,CAAC,UAA+B,CAAC,CAAC;IACpF,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,CAAC;IACzB,OAAO,uCAAiB,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC;AAC/D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# no-relative-import-in-test
|
|
2
|
-
|
|
3
|
-
A test file should not contain relative imports; it should use a global import of the library using [module resolution](http://www.typescriptlang.org/docs/handbook/module-resolution.html).
|
|
4
|
-
|
|
5
|
-
**Bad**:
|
|
6
|
-
|
|
7
|
-
```ts
|
|
8
|
-
import foo from "./index.d.ts";
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
**Good**:
|
|
12
|
-
|
|
13
|
-
```ts
|
|
14
|
-
import foo from "foo";
|
|
15
|
-
```
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# no-single-declare-module
|
|
2
|
-
|
|
3
|
-
`declare module` should typically be avoided.
|
|
4
|
-
Instead, the file itself should be used as the declaration for the module.
|
|
5
|
-
TypeScript uses [module resolution](http://www.typescriptlang.org/docs/handbook/module-resolution.html) to determine what files are associated with what modules.
|
|
6
|
-
|
|
7
|
-
**Bad**:
|
|
8
|
-
|
|
9
|
-
```ts
|
|
10
|
-
declare module "mylib" {
|
|
11
|
-
function foo(): number;
|
|
12
|
-
}
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
**Good**:
|
|
16
|
-
|
|
17
|
-
```ts
|
|
18
|
-
export function foo(): number;
|
|
19
|
-
```
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# strict-export-declare-modifiers
|
|
2
|
-
|
|
3
|
-
Avoid adding the `declare` keyword unnecessarily.
|
|
4
|
-
Do add the `export` keyword unnecessarily, because sometimes it is necessary and we want to be consistent.
|
|
5
|
-
|
|
6
|
-
**Bad**:
|
|
7
|
-
|
|
8
|
-
```ts
|
|
9
|
-
export declare function f(): void;
|
|
10
|
-
declare function g(): void;
|
|
11
|
-
interface I {}
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
**Good**:
|
|
16
|
-
|
|
17
|
-
```ts
|
|
18
|
-
export function f(): void;
|
|
19
|
-
export function g(): void;
|
|
20
|
-
export interface I {}
|
|
21
|
-
```
|
package/docs/void-return.md
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# void-return
|
|
2
|
-
|
|
3
|
-
`void` should be used as a return type, but not as a parameter type.
|
|
4
|
-
|
|
5
|
-
**Bad**:
|
|
6
|
-
|
|
7
|
-
```ts
|
|
8
|
-
export function f(x: string | void): undefined;
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
**Good**:
|
|
12
|
-
|
|
13
|
-
```ts
|
|
14
|
-
export function f(x: string | undefined): void;
|
|
15
|
-
```
|
package/src/.vscode/launch.json
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// Use IntelliSense to learn about possible attributes.
|
|
3
|
-
// Hover to view descriptions of existing attributes.
|
|
4
|
-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
-
"version": "0.2.0",
|
|
6
|
-
"configurations": [
|
|
7
|
-
{
|
|
8
|
-
"type": "node",
|
|
9
|
-
"request": "attach",
|
|
10
|
-
"name": "Attach",
|
|
11
|
-
"port": 9229,
|
|
12
|
-
"sourceMaps": true
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"type": "node",
|
|
16
|
-
"request": "launch",
|
|
17
|
-
"name": "Launch Program",
|
|
18
|
-
"program": "${file}"
|
|
19
|
-
}
|
|
20
|
-
]
|
|
21
|
-
}
|
package/src/checks.ts
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import * as header from "@definitelytyped/header-parser";
|
|
2
|
-
import { AllTypeScriptVersion } from "@definitelytyped/typescript-versions";
|
|
3
|
-
import fs from "fs";
|
|
4
|
-
import { join as joinPaths } from "path";
|
|
5
|
-
import { CompilerOptions } from "typescript";
|
|
6
|
-
import { deepEquals } from "@definitelytyped/utils";
|
|
7
|
-
|
|
8
|
-
import { readJson, packageNameFromPath } from "./util";
|
|
9
|
-
export function checkPackageJson(
|
|
10
|
-
dirPath: string,
|
|
11
|
-
typesVersions: readonly AllTypeScriptVersion[],
|
|
12
|
-
): header.Header | string[] {
|
|
13
|
-
const pkgJsonPath = joinPaths(dirPath, "package.json");
|
|
14
|
-
if (!fs.existsSync(pkgJsonPath)) {
|
|
15
|
-
throw new Error(`${dirPath}: Missing 'package.json'`);
|
|
16
|
-
}
|
|
17
|
-
return header.validatePackageJson(packageNameFromPath(dirPath), readJson(pkgJsonPath), typesVersions);
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* numbers in `CompilerOptions` might be enum values mapped from strings
|
|
21
|
-
*/
|
|
22
|
-
export type CompilerOptionsRaw = {
|
|
23
|
-
[K in keyof CompilerOptions]?: CompilerOptions[K] extends number | undefined
|
|
24
|
-
? string | number | undefined
|
|
25
|
-
: CompilerOptions[K];
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export function checkTsconfig(dirPath: string, options: CompilerOptionsRaw): string[] {
|
|
29
|
-
const errors = [];
|
|
30
|
-
const mustHave = {
|
|
31
|
-
noEmit: true,
|
|
32
|
-
forceConsistentCasingInFileNames: true,
|
|
33
|
-
types: [],
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
for (const key of Object.getOwnPropertyNames(mustHave) as (keyof typeof mustHave)[]) {
|
|
37
|
-
const expected = mustHave[key];
|
|
38
|
-
const actual = options[key];
|
|
39
|
-
if (!deepEquals(expected, actual)) {
|
|
40
|
-
errors.push(
|
|
41
|
-
`Expected compilerOptions[${JSON.stringify(key)}] === ${JSON.stringify(expected)}, but got ${JSON.stringify(
|
|
42
|
-
actual,
|
|
43
|
-
)}`,
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
for (const key in options) {
|
|
49
|
-
switch (key) {
|
|
50
|
-
case "lib":
|
|
51
|
-
case "noImplicitAny":
|
|
52
|
-
case "noImplicitThis":
|
|
53
|
-
case "strict":
|
|
54
|
-
case "strictNullChecks":
|
|
55
|
-
case "noUncheckedIndexedAccess":
|
|
56
|
-
case "strictFunctionTypes":
|
|
57
|
-
case "esModuleInterop":
|
|
58
|
-
case "allowSyntheticDefaultImports":
|
|
59
|
-
case "target":
|
|
60
|
-
case "jsx":
|
|
61
|
-
case "jsxFactory":
|
|
62
|
-
case "experimentalDecorators":
|
|
63
|
-
case "noUnusedLocals":
|
|
64
|
-
case "noUnusedParameters":
|
|
65
|
-
case "exactOptionalPropertyTypes":
|
|
66
|
-
case "module":
|
|
67
|
-
case "paths":
|
|
68
|
-
break;
|
|
69
|
-
default:
|
|
70
|
-
if (!(key in mustHave)) {
|
|
71
|
-
errors.push(`Unexpected compiler option ${key}`);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
if (!("lib" in options)) {
|
|
76
|
-
errors.push('Must specify "lib", usually to `"lib": ["es6"]` or `"lib": ["es6", "dom"]`.');
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
if (!("module" in options)) {
|
|
80
|
-
errors.push('Must specify "module" to `"module": "commonjs"` or `"module": "node16"`.');
|
|
81
|
-
} else if (
|
|
82
|
-
options.module?.toString().toLowerCase() !== "commonjs" &&
|
|
83
|
-
options.module?.toString().toLowerCase() !== "node16"
|
|
84
|
-
) {
|
|
85
|
-
errors.push(`When "module" is present, it must be set to "commonjs" or "node16".`);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
if ("strict" in options) {
|
|
89
|
-
if (options.strict !== true) {
|
|
90
|
-
errors.push('When "strict" is present, it must be set to `true`.');
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
for (const key of ["noImplicitAny", "noImplicitThis", "strictNullChecks", "strictFunctionTypes"]) {
|
|
94
|
-
if (key in options) {
|
|
95
|
-
throw new TypeError(`Expected "${key}" to not be set when "strict" is \`true\`.`);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
} else {
|
|
99
|
-
for (const key of ["noImplicitAny", "noImplicitThis", "strictNullChecks", "strictFunctionTypes"]) {
|
|
100
|
-
if (!(key in options)) {
|
|
101
|
-
errors.push(`Expected \`"${key}": true\` or \`"${key}": false\`.`);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
if ("exactOptionalPropertyTypes" in options) {
|
|
106
|
-
if (options.exactOptionalPropertyTypes !== true) {
|
|
107
|
-
errors.push('When "exactOptionalPropertyTypes" is present, it must be set to `true`.');
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
if (options.types && options.types.length) {
|
|
112
|
-
errors.push(
|
|
113
|
-
'Use `/// <reference types="..." />` directives in source files and ensure ' +
|
|
114
|
-
'that the "types" field in your tsconfig is an empty array.',
|
|
115
|
-
);
|
|
116
|
-
}
|
|
117
|
-
if (options.paths) {
|
|
118
|
-
for (const key in options.paths) {
|
|
119
|
-
if (options.paths[key].length !== 1) {
|
|
120
|
-
errors.push(`${dirPath}/tsconfig.json: "paths" must map each module specifier to only one file.`);
|
|
121
|
-
}
|
|
122
|
-
const [target] = options.paths[key];
|
|
123
|
-
if (target !== "./index.d.ts") {
|
|
124
|
-
const m = target.match(/^(?:..\/)+([^\/]+)\/(?:v\d+\.?\d*\/)?index.d.ts$/);
|
|
125
|
-
if (!m || m[1] !== key) {
|
|
126
|
-
errors.push(`${dirPath}/tsconfig.json: "paths" must map '${key}' to ${key}'s index.d.ts.`);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
return errors;
|
|
132
|
-
}
|
package/src/createProgram.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
// This file is intentionally similar to TSLint's old Linter.createProgram API:
|
|
2
|
-
// https://github.com/palantir/tslint/blob/285fc1db18d1fd24680d6a2282c6445abf1566ee/src/linter.ts#L54
|
|
3
|
-
// TODO: creating a program to get a list of files is pretty heavyweight.
|
|
4
|
-
|
|
5
|
-
import * as fs from "fs";
|
|
6
|
-
import * as path from "path";
|
|
7
|
-
import * as ts from "typescript";
|
|
8
|
-
|
|
9
|
-
export function createProgram(configFile: string): ts.Program {
|
|
10
|
-
const config = ts.readConfigFile(configFile, ts.sys.readFile);
|
|
11
|
-
if (config.error !== undefined) {
|
|
12
|
-
throw new Error(
|
|
13
|
-
ts.formatDiagnostics([config.error], {
|
|
14
|
-
getCanonicalFileName: (f) => f,
|
|
15
|
-
getCurrentDirectory: process.cwd,
|
|
16
|
-
getNewLine: () => "\n",
|
|
17
|
-
}),
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const parseConfigHost: ts.ParseConfigHost = {
|
|
22
|
-
fileExists: fs.existsSync,
|
|
23
|
-
readDirectory: ts.sys.readDirectory,
|
|
24
|
-
readFile: (file) => fs.readFileSync(file, "utf8"),
|
|
25
|
-
useCaseSensitiveFileNames: true,
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
const projectDirectory = path.dirname(configFile);
|
|
29
|
-
const parsed = ts.parseJsonConfigFileContent(config.config, parseConfigHost, path.resolve(projectDirectory), {
|
|
30
|
-
noEmit: true,
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
// ignore warnings and 'TS18003: No inputs were found in config file ...'
|
|
34
|
-
const errors = parsed.errors?.filter((d) => d.category === ts.DiagnosticCategory.Error && d.code !== 18003);
|
|
35
|
-
if (errors?.length) {
|
|
36
|
-
throw new Error(
|
|
37
|
-
ts.formatDiagnostics(errors, {
|
|
38
|
-
getCanonicalFileName: (f) => f,
|
|
39
|
-
getCurrentDirectory: process.cwd,
|
|
40
|
-
getNewLine: () => "\n",
|
|
41
|
-
}),
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const host = ts.createCompilerHost(parsed.options, true);
|
|
46
|
-
|
|
47
|
-
return ts.createProgram(parsed.fileNames, parsed.options, host);
|
|
48
|
-
}
|
package/src/index.ts
DELETED
|
@@ -1,290 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { AllTypeScriptVersion, TypeScriptVersion } from "@definitelytyped/typescript-versions";
|
|
4
|
-
import assert = require("assert");
|
|
5
|
-
import fs from "fs";
|
|
6
|
-
import { basename, dirname, join as joinPaths, resolve } from "path";
|
|
7
|
-
|
|
8
|
-
import { deepEquals } from "@definitelytyped/utils";
|
|
9
|
-
import { checkPackageJson, checkTsconfig } from "./checks";
|
|
10
|
-
import { lint, TsVersion } from "./lint";
|
|
11
|
-
import { getCompilerOptions, packageNameFromPath } from "./util";
|
|
12
|
-
import { getTypesVersions } from "@definitelytyped/header-parser";
|
|
13
|
-
|
|
14
|
-
async function main(): Promise<void> {
|
|
15
|
-
const args = process.argv.slice(2);
|
|
16
|
-
let dirPath = process.cwd();
|
|
17
|
-
let onlyTestTsNext = false;
|
|
18
|
-
let expectOnly = false;
|
|
19
|
-
let shouldListen = false;
|
|
20
|
-
let lookingForTsLocal = false;
|
|
21
|
-
let tsLocal: string | undefined;
|
|
22
|
-
|
|
23
|
-
console.log(`dtslint@${require("../package.json").version}`);
|
|
24
|
-
if (args.length === 1 && args[0] === "types") {
|
|
25
|
-
console.log(
|
|
26
|
-
"Please provide a package name to test.\nTo test all changed packages at once, run `pnpm run test-all`.",
|
|
27
|
-
);
|
|
28
|
-
process.exit(1);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
for (const arg of args) {
|
|
32
|
-
if (lookingForTsLocal) {
|
|
33
|
-
if (arg.startsWith("--")) {
|
|
34
|
-
throw new Error("Looking for local path for TS, but got " + arg);
|
|
35
|
-
}
|
|
36
|
-
tsLocal = resolve(arg);
|
|
37
|
-
lookingForTsLocal = false;
|
|
38
|
-
continue;
|
|
39
|
-
}
|
|
40
|
-
switch (arg) {
|
|
41
|
-
case "--localTs":
|
|
42
|
-
lookingForTsLocal = true;
|
|
43
|
-
break;
|
|
44
|
-
case "--version":
|
|
45
|
-
console.log(require("../../package.json").version);
|
|
46
|
-
return;
|
|
47
|
-
case "--expectOnly":
|
|
48
|
-
expectOnly = true;
|
|
49
|
-
break;
|
|
50
|
-
case "--onlyTestTsNext":
|
|
51
|
-
onlyTestTsNext = true;
|
|
52
|
-
break;
|
|
53
|
-
// Only for use by types-publisher.
|
|
54
|
-
// Listens for { path, onlyTestTsNext } messages and outputs { path, status }.
|
|
55
|
-
case "--listen":
|
|
56
|
-
shouldListen = true;
|
|
57
|
-
break;
|
|
58
|
-
default: {
|
|
59
|
-
if (arg.startsWith("--")) {
|
|
60
|
-
console.error(`Unknown option '${arg}'`);
|
|
61
|
-
usage();
|
|
62
|
-
process.exit(1);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const path =
|
|
66
|
-
arg.indexOf("@") === 0 && arg.indexOf("/") !== -1
|
|
67
|
-
? // we have a scoped module, e.g. @bla/foo
|
|
68
|
-
// which should be converted to bla__foo
|
|
69
|
-
arg.slice(1).replace("/", "__")
|
|
70
|
-
: arg;
|
|
71
|
-
dirPath = joinPaths(dirPath, path);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
if (lookingForTsLocal) {
|
|
76
|
-
throw new Error("Path for --localTs was not provided.");
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
if (shouldListen) {
|
|
80
|
-
listen(dirPath, tsLocal);
|
|
81
|
-
} else {
|
|
82
|
-
await runTests(dirPath, onlyTestTsNext, expectOnly, tsLocal);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
function usage(): void {
|
|
87
|
-
console.error("Usage: dtslint [--version] [--onlyTestTsNext] [--expectOnly] [--localTs path]");
|
|
88
|
-
console.error("Args:");
|
|
89
|
-
console.error(" --version Print version and exit.");
|
|
90
|
-
console.error(" --expectOnly Run only the ExpectType lint rule.");
|
|
91
|
-
console.error(" --onlyTestTsNext Only run with `typescript@next`, not with the minimum version.");
|
|
92
|
-
console.error(" --localTs path Run with *path* as the latest version of TS.");
|
|
93
|
-
console.error("");
|
|
94
|
-
console.error("onlyTestTsNext and localTs are (1) mutually exclusive and (2) test a single version of TS");
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
function listen(dirPath: string, tsLocal: string | undefined): void {
|
|
98
|
-
// Don't await this here to ensure that messages sent during installation aren't dropped.
|
|
99
|
-
process.on("message", async (message: unknown) => {
|
|
100
|
-
const { path, onlyTestTsNext, expectOnly } = message as {
|
|
101
|
-
path: string;
|
|
102
|
-
onlyTestTsNext: boolean;
|
|
103
|
-
expectOnly?: boolean;
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
runTests(joinPaths(dirPath, path), onlyTestTsNext, !!expectOnly, tsLocal)
|
|
107
|
-
.catch((e) => e.stack)
|
|
108
|
-
.then((maybeError) => {
|
|
109
|
-
process.send!({ path, status: maybeError === undefined ? "OK" : maybeError });
|
|
110
|
-
})
|
|
111
|
-
.catch((e) => console.error(e.stack));
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
async function runTests(
|
|
116
|
-
dirPath: string,
|
|
117
|
-
onlyTestTsNext: boolean,
|
|
118
|
-
expectOnly: boolean,
|
|
119
|
-
tsLocal: string | undefined,
|
|
120
|
-
): Promise<void> {
|
|
121
|
-
// Assert that we're really on DefinitelyTyped.
|
|
122
|
-
const dtRoot = findDTRoot(dirPath);
|
|
123
|
-
const packageName = packageNameFromPath(dirPath);
|
|
124
|
-
assertPathIsInDefinitelyTyped(dirPath, dtRoot);
|
|
125
|
-
assertPathIsNotBanned(packageName);
|
|
126
|
-
assertPackageIsNotDeprecated(
|
|
127
|
-
packageName,
|
|
128
|
-
await fs.promises.readFile(joinPaths(dtRoot, "notNeededPackages.json"), "utf-8"),
|
|
129
|
-
);
|
|
130
|
-
|
|
131
|
-
const typesVersions = getTypesVersions(dirPath);
|
|
132
|
-
const packageJson = checkPackageJson(dirPath, typesVersions);
|
|
133
|
-
if (Array.isArray(packageJson)) {
|
|
134
|
-
throw new Error("\n\t* " + packageJson.join("\n\t* "));
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
await assertNpmIgnoreExpected(dirPath);
|
|
138
|
-
assertNoOtherFiles(dirPath);
|
|
139
|
-
|
|
140
|
-
const minVersion = maxVersion(packageJson.minimumTypeScriptVersion, TypeScriptVersion.lowest);
|
|
141
|
-
if (onlyTestTsNext || tsLocal) {
|
|
142
|
-
const tsVersion = tsLocal ? "local" : TypeScriptVersion.latest;
|
|
143
|
-
await testTypesVersion(dirPath, tsVersion, tsVersion, expectOnly, tsLocal, /*isLatest*/ true);
|
|
144
|
-
} else {
|
|
145
|
-
// For example, typesVersions of [3.2, 3.5, 3.6] will have
|
|
146
|
-
// associated ts3.2, ts3.5, ts3.6 directories, for
|
|
147
|
-
// <=3.2, <=3.5, <=3.6 respectively; the root level is for 3.7 and above.
|
|
148
|
-
// so this code needs to generate ranges [lowest-3.2, 3.3-3.5, 3.6-3.6, 3.7-latest]
|
|
149
|
-
const lows = [TypeScriptVersion.lowest, ...typesVersions.map(next)];
|
|
150
|
-
const his = [...typesVersions, TypeScriptVersion.latest];
|
|
151
|
-
assert.strictEqual(lows.length, his.length);
|
|
152
|
-
for (let i = 0; i < lows.length; i++) {
|
|
153
|
-
const low = maxVersion(minVersion, lows[i]);
|
|
154
|
-
const hi = his[i];
|
|
155
|
-
assert(
|
|
156
|
-
parseFloat(hi) >= parseFloat(low),
|
|
157
|
-
`'"minimumTypeScriptVersion": "${minVersion}"' in package.json skips ts${hi} folder.`,
|
|
158
|
-
);
|
|
159
|
-
const isLatest = hi === TypeScriptVersion.latest;
|
|
160
|
-
const versionPath = isLatest ? dirPath : joinPaths(dirPath, `ts${hi}`);
|
|
161
|
-
if (lows.length > 1) {
|
|
162
|
-
console.log("testing from", low, "to", hi, "in", versionPath);
|
|
163
|
-
}
|
|
164
|
-
await testTypesVersion(versionPath, low, hi, expectOnly, undefined, isLatest);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
function maxVersion(v1: AllTypeScriptVersion, v2: TypeScriptVersion): TypeScriptVersion {
|
|
170
|
-
// Note: For v1 to be later than v2, it must be a current Typescript version. So the type assertion is safe.
|
|
171
|
-
return parseFloat(v1) >= parseFloat(v2) ? (v1 as TypeScriptVersion) : v2;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
function next(v: TypeScriptVersion): TypeScriptVersion {
|
|
175
|
-
const index = TypeScriptVersion.supported.indexOf(v);
|
|
176
|
-
assert.notStrictEqual(index, -1);
|
|
177
|
-
assert(index < TypeScriptVersion.supported.length);
|
|
178
|
-
return TypeScriptVersion.supported[index + 1];
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
async function testTypesVersion(
|
|
182
|
-
dirPath: string,
|
|
183
|
-
lowVersion: TsVersion,
|
|
184
|
-
hiVersion: TsVersion,
|
|
185
|
-
expectOnly: boolean,
|
|
186
|
-
tsLocal: string | undefined,
|
|
187
|
-
isLatest: boolean,
|
|
188
|
-
): Promise<void> {
|
|
189
|
-
const tsconfigErrors = checkTsconfig(dirPath, getCompilerOptions(dirPath));
|
|
190
|
-
if (tsconfigErrors.length > 0) {
|
|
191
|
-
throw new Error("\n\t* " + tsconfigErrors.join("\n\t* "));
|
|
192
|
-
}
|
|
193
|
-
const err = await lint(dirPath, lowVersion, hiVersion, isLatest, expectOnly, tsLocal);
|
|
194
|
-
if (err) {
|
|
195
|
-
throw new Error(err);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
function findDTRoot(dirPath: string) {
|
|
200
|
-
let path = dirPath;
|
|
201
|
-
while (basename(path) !== "types" && dirname(path) !== "." && dirname(path) !== "/") {
|
|
202
|
-
path = dirname(path);
|
|
203
|
-
}
|
|
204
|
-
return dirname(path);
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
function assertPathIsInDefinitelyTyped(dirPath: string, dtRoot: string): void {
|
|
208
|
-
// TODO: It's not clear whether this assertion makes sense, and it's broken on Azure Pipelines (perhaps because DT isn't cloned into DefinitelyTyped)
|
|
209
|
-
// Re-enable it later if it makes sense.
|
|
210
|
-
// if (basename(dtRoot) !== "DefinitelyTyped")) {
|
|
211
|
-
if (!fs.existsSync(joinPaths(dtRoot, "types"))) {
|
|
212
|
-
throw new Error(
|
|
213
|
-
"Since this type definition includes a header (a comment starting with `// Type definitions for`), " +
|
|
214
|
-
"assumed this was a DefinitelyTyped package.\n" +
|
|
215
|
-
"But it is not in a `DefinitelyTyped/types/xxx` directory: " +
|
|
216
|
-
dirPath,
|
|
217
|
-
);
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* Starting at some point in time, npm has banned all new packages whose names
|
|
223
|
-
* contain the word `download`. However, some older packages exist that still
|
|
224
|
-
* contain this name.
|
|
225
|
-
* @NOTE for contributors: The list of literal exceptions below should ONLY be
|
|
226
|
-
* extended with packages for which there already exists a corresponding type
|
|
227
|
-
* definition package in the `@types` scope. More information:
|
|
228
|
-
* https://github.com/microsoft/DefinitelyTyped-tools/pull/381.
|
|
229
|
-
*/
|
|
230
|
-
function assertPathIsNotBanned(packageName: string) {
|
|
231
|
-
if (
|
|
232
|
-
/(^|\W)download($|\W)/.test(packageName) &&
|
|
233
|
-
packageName !== "download" &&
|
|
234
|
-
packageName !== "downloadjs" &&
|
|
235
|
-
packageName !== "s3-download-stream"
|
|
236
|
-
) {
|
|
237
|
-
// Since npm won't release their banned-words list, we'll have to manually add to this list.
|
|
238
|
-
throw new Error(`${packageName}: Contains the word 'download', which is banned by npm.`);
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
export function assertPackageIsNotDeprecated(packageName: string, notNeededPackages: string) {
|
|
243
|
-
const unneeded = JSON.parse(notNeededPackages).packages;
|
|
244
|
-
if (Object.keys(unneeded).includes(packageName)) {
|
|
245
|
-
throw new Error(`${packageName}: notNeededPackages.json has an entry for ${packageName}.
|
|
246
|
-
That means ${packageName} ships its own types, and @types/${packageName} was deprecated and removed from Definitely Typed.
|
|
247
|
-
If you want to re-add @types/${packageName}, please remove its entry from notNeededPackages.json.`);
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
if (require.main === module) {
|
|
252
|
-
main().catch((err) => {
|
|
253
|
-
console.error(err.stack);
|
|
254
|
-
process.exit(1);
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
async function assertNpmIgnoreExpected(dirPath: string) {
|
|
259
|
-
const expected = ["*", "!**/*.d.ts", "!**/*.d.cts", "!**/*.d.mts", "!**/*.d.*.ts"];
|
|
260
|
-
|
|
261
|
-
if (basename(dirname(dirPath)) === "types") {
|
|
262
|
-
for (const subdir of fs.readdirSync(dirPath, { withFileTypes: true })) {
|
|
263
|
-
if (subdir.isDirectory() && /^v(\d+)(\.(\d+))?$/.test(subdir.name)) {
|
|
264
|
-
expected.push(`/${subdir.name}/`);
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
const expectedString = expected.join("\n");
|
|
270
|
-
|
|
271
|
-
const npmIgnorePath = joinPaths(dirPath, ".npmignore");
|
|
272
|
-
if (!fs.existsSync(npmIgnorePath)) {
|
|
273
|
-
throw new Error(`${dirPath}: Missing '.npmignore'; should contain:\n${expectedString}`);
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
const actualRaw = await fs.promises.readFile(npmIgnorePath, "utf-8");
|
|
277
|
-
const actual = actualRaw.trim().split(/\r?\n/);
|
|
278
|
-
|
|
279
|
-
if (!deepEquals(actual, expected)) {
|
|
280
|
-
throw new Error(`${dirPath}: Incorrect '.npmignore'; should be:\n${expectedString}`);
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
function assertNoOtherFiles(dirPath: string) {
|
|
285
|
-
if (fs.existsSync(joinPaths(dirPath, "OTHER_FILES.txt"))) {
|
|
286
|
-
throw new Error(
|
|
287
|
-
`${dirPath}: Should not contain 'OTHER_FILES.txt"'. All files matching "**/*.d.{ts,cts,mts,*.ts}" are automatically included.`,
|
|
288
|
-
);
|
|
289
|
-
}
|
|
290
|
-
}
|
package/src/lint.ts
DELETED
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
import { TypeScriptVersion } from "@definitelytyped/typescript-versions";
|
|
2
|
-
import { typeScriptPath, withoutStart } from "@definitelytyped/utils";
|
|
3
|
-
import assert = require("assert");
|
|
4
|
-
import { join as joinPaths, normalize } from "path";
|
|
5
|
-
import { ESLint } from "eslint";
|
|
6
|
-
import * as TsType from "typescript";
|
|
7
|
-
|
|
8
|
-
import { createProgram } from "./createProgram";
|
|
9
|
-
|
|
10
|
-
export async function lint(
|
|
11
|
-
dirPath: string,
|
|
12
|
-
minVersion: TsVersion,
|
|
13
|
-
maxVersion: TsVersion,
|
|
14
|
-
isLatest: boolean,
|
|
15
|
-
expectOnly: boolean,
|
|
16
|
-
tsLocal: string | undefined,
|
|
17
|
-
): Promise<string | undefined> {
|
|
18
|
-
const tsconfigPath = joinPaths(dirPath, "tsconfig.json");
|
|
19
|
-
const estree = require(
|
|
20
|
-
require.resolve("@typescript-eslint/typescript-estree", { paths: [dirPath] }),
|
|
21
|
-
) as typeof import("@typescript-eslint/typescript-estree");
|
|
22
|
-
process.env.TSESTREE_SINGLE_RUN = "true";
|
|
23
|
-
const lintProgram = createProgram(tsconfigPath);
|
|
24
|
-
const files = [];
|
|
25
|
-
|
|
26
|
-
for (const file of lintProgram.getSourceFiles()) {
|
|
27
|
-
if (lintProgram.isSourceFileDefaultLibrary(file)) {
|
|
28
|
-
continue;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const { fileName, text } = file;
|
|
32
|
-
if (!fileName.includes("node_modules")) {
|
|
33
|
-
const err = testNoLintDisables(text);
|
|
34
|
-
if (err) {
|
|
35
|
-
const { pos, message } = err;
|
|
36
|
-
const place = file.getLineAndCharacterOfPosition(pos);
|
|
37
|
-
return `At ${fileName}:${JSON.stringify(place)}: ${message}`;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// External dependencies should have been handled by `testDependencies`;
|
|
42
|
-
// typesVersions should be handled in a separate lint
|
|
43
|
-
if (!isExternalDependency(file, dirPath, lintProgram) && (!isLatest || !isTypesVersionPath(fileName, dirPath))) {
|
|
44
|
-
files.push(fileName);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const options = getEslintOptions(expectOnly, minVersion, maxVersion, tsLocal);
|
|
49
|
-
const eslint = new ESLint(options);
|
|
50
|
-
const formatter = await eslint.loadFormatter("stylish");
|
|
51
|
-
const results = await eslint.lintFiles(files);
|
|
52
|
-
const output = formatter.format(results);
|
|
53
|
-
estree.clearCaches();
|
|
54
|
-
return output;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
function getEslintOptions(
|
|
58
|
-
expectOnly: boolean,
|
|
59
|
-
minVersion: TsVersion,
|
|
60
|
-
maxVersion: TsVersion,
|
|
61
|
-
tsLocal: string | undefined,
|
|
62
|
-
): ESLint.Options {
|
|
63
|
-
const versionsToTest = range(minVersion, maxVersion).map((versionName) => ({
|
|
64
|
-
versionName,
|
|
65
|
-
path: typeScriptPath(versionName, tsLocal),
|
|
66
|
-
}));
|
|
67
|
-
|
|
68
|
-
const allFiles = ["*.ts", "*.cts", "*.mts", "*.tsx"];
|
|
69
|
-
|
|
70
|
-
const overrideConfig: ESLint.Options["overrideConfig"] = {
|
|
71
|
-
overrides: [
|
|
72
|
-
{
|
|
73
|
-
files: allFiles,
|
|
74
|
-
rules: {
|
|
75
|
-
"@definitelytyped/expect": ["error", { versionsToTest }],
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
],
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
if (expectOnly) {
|
|
82
|
-
return {
|
|
83
|
-
useEslintrc: false,
|
|
84
|
-
overrideConfig: {
|
|
85
|
-
plugins: ["@definitelytyped", "@typescript-eslint", "jsdoc"],
|
|
86
|
-
parser: "@typescript-eslint/parser",
|
|
87
|
-
parserOptions: {
|
|
88
|
-
project: true,
|
|
89
|
-
warnOnUnsupportedTypeScriptVersion: false,
|
|
90
|
-
},
|
|
91
|
-
...overrideConfig,
|
|
92
|
-
},
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
return {
|
|
97
|
-
overrideConfig,
|
|
98
|
-
baseConfig: {
|
|
99
|
-
overrides: [
|
|
100
|
-
{
|
|
101
|
-
files: allFiles,
|
|
102
|
-
rules: {
|
|
103
|
-
"@definitelytyped/npm-naming": "error",
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
],
|
|
107
|
-
},
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export function isExternalDependency(file: TsType.SourceFile, dirPath: string, program: TsType.Program): boolean {
|
|
112
|
-
return !startsWithDirectory(file.fileName, dirPath) || program.isSourceFileFromExternalLibrary(file);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
function normalizePath(file: string) {
|
|
116
|
-
// replaces '\' with '/' and forces all DOS drive letters to be upper-case
|
|
117
|
-
return normalize(file)
|
|
118
|
-
.replace(/\\/g, "/")
|
|
119
|
-
.replace(/^[a-z](?=:)/, (c) => c.toUpperCase());
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
function isTypesVersionPath(fileName: string, dirPath: string) {
|
|
123
|
-
const normalFileName = normalizePath(fileName);
|
|
124
|
-
const normalDirPath = normalizePath(dirPath);
|
|
125
|
-
const subdirPath = withoutStart(normalFileName, normalDirPath);
|
|
126
|
-
return subdirPath && /^\/ts\d+\.\d/.test(subdirPath);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
function startsWithDirectory(filePath: string, dirPath: string): boolean {
|
|
130
|
-
const normalFilePath = normalizePath(filePath);
|
|
131
|
-
const normalDirPath = normalizePath(dirPath).replace(/\/$/, "");
|
|
132
|
-
return normalFilePath.startsWith(normalDirPath + "/") || normalFilePath.startsWith(normalDirPath + "\\");
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
interface Err {
|
|
136
|
-
pos: number;
|
|
137
|
-
message: string;
|
|
138
|
-
}
|
|
139
|
-
function testNoLintDisables(text: string): Err | undefined {
|
|
140
|
-
const disabler = "eslint-disable";
|
|
141
|
-
let lastIndex = 0;
|
|
142
|
-
while (true) {
|
|
143
|
-
const pos = text.indexOf(disabler, lastIndex);
|
|
144
|
-
if (pos === -1) {
|
|
145
|
-
return undefined;
|
|
146
|
-
}
|
|
147
|
-
const end = pos + disabler.length;
|
|
148
|
-
const nextChar = text.charAt(end);
|
|
149
|
-
const nextChar2 = text.charAt(end + 1);
|
|
150
|
-
if (nextChar !== "-" && !(nextChar === " " && nextChar2 !== "*")) {
|
|
151
|
-
const message =
|
|
152
|
-
`'${disabler}' is forbidden. ` +
|
|
153
|
-
"Per-line and per-rule disabling is allowed, for example: " +
|
|
154
|
-
"'eslint-disable:rulename', eslint-disable-line' and 'eslint-disable-next-line' are allowed.";
|
|
155
|
-
return { pos, message };
|
|
156
|
-
}
|
|
157
|
-
lastIndex = end;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
function range(minVersion: TsVersion, maxVersion: TsVersion): readonly TsVersion[] {
|
|
162
|
-
if (minVersion === "local") {
|
|
163
|
-
assert(maxVersion === "local");
|
|
164
|
-
return ["local"];
|
|
165
|
-
}
|
|
166
|
-
if (minVersion === TypeScriptVersion.latest) {
|
|
167
|
-
assert(maxVersion === TypeScriptVersion.latest);
|
|
168
|
-
return [TypeScriptVersion.latest];
|
|
169
|
-
}
|
|
170
|
-
assert(maxVersion !== "local");
|
|
171
|
-
|
|
172
|
-
const minIdx = TypeScriptVersion.supported.indexOf(minVersion);
|
|
173
|
-
assert(minIdx >= 0);
|
|
174
|
-
if (maxVersion === TypeScriptVersion.latest) {
|
|
175
|
-
return [...TypeScriptVersion.supported.slice(minIdx), TypeScriptVersion.latest];
|
|
176
|
-
}
|
|
177
|
-
const maxIdx = TypeScriptVersion.supported.indexOf(maxVersion as TypeScriptVersion);
|
|
178
|
-
assert(maxIdx >= minIdx);
|
|
179
|
-
return TypeScriptVersion.supported.slice(minIdx, maxIdx + 1);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
export type TsVersion = TypeScriptVersion | "local";
|
package/src/util.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import fs from "fs";
|
|
2
|
-
import { basename, dirname, join } from "path";
|
|
3
|
-
import stripJsonComments = require("strip-json-comments");
|
|
4
|
-
import * as ts from "typescript";
|
|
5
|
-
|
|
6
|
-
export function packageNameFromPath(path: string): string {
|
|
7
|
-
const base = basename(path);
|
|
8
|
-
return /^v\d+(\.\d+)?$/.exec(base) || /^ts\d\.\d/.exec(base) ? basename(dirname(path)) : base;
|
|
9
|
-
}
|
|
10
|
-
export function readJson(path: string) {
|
|
11
|
-
const text = fs.readFileSync(path, "utf-8");
|
|
12
|
-
return JSON.parse(stripJsonComments(text));
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function getCompilerOptions(dirPath: string): ts.CompilerOptions {
|
|
16
|
-
const tsconfigPath = join(dirPath, "tsconfig.json");
|
|
17
|
-
if (!fs.existsSync(tsconfigPath)) {
|
|
18
|
-
throw new Error(`Need a 'tsconfig.json' file in ${dirPath}`);
|
|
19
|
-
}
|
|
20
|
-
return readJson(tsconfigPath).compilerOptions as ts.CompilerOptions;
|
|
21
|
-
}
|
package/test/index.test.ts
DELETED
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
/// <reference types="jest" />
|
|
2
|
-
import { CompilerOptionsRaw, checkTsconfig } from "../src/checks";
|
|
3
|
-
import { assertPackageIsNotDeprecated } from "../src/index";
|
|
4
|
-
|
|
5
|
-
describe("dtslint", () => {
|
|
6
|
-
const base: CompilerOptionsRaw = {
|
|
7
|
-
module: "commonjs",
|
|
8
|
-
lib: ["es6"],
|
|
9
|
-
noImplicitAny: true,
|
|
10
|
-
noImplicitThis: true,
|
|
11
|
-
strictNullChecks: true,
|
|
12
|
-
strictFunctionTypes: true,
|
|
13
|
-
types: [],
|
|
14
|
-
noEmit: true,
|
|
15
|
-
forceConsistentCasingInFileNames: true,
|
|
16
|
-
};
|
|
17
|
-
describe("checks", () => {
|
|
18
|
-
describe("checkTsconfig", () => {
|
|
19
|
-
it("disallows unknown compiler options", () => {
|
|
20
|
-
expect(checkTsconfig("test", { ...base, completelyInvented: true })).toEqual([
|
|
21
|
-
"Unexpected compiler option completelyInvented",
|
|
22
|
-
]);
|
|
23
|
-
});
|
|
24
|
-
it("allows exactOptionalPropertyTypes: true", () => {
|
|
25
|
-
expect(checkTsconfig("test", { ...base, exactOptionalPropertyTypes: true })).toEqual([]);
|
|
26
|
-
});
|
|
27
|
-
it("allows module: node16", () => {
|
|
28
|
-
expect(checkTsconfig("test", { ...base, module: "node16" })).toEqual([]);
|
|
29
|
-
});
|
|
30
|
-
it("allows `paths`", () => {
|
|
31
|
-
expect(checkTsconfig("test", { ...base, paths: { boom: ["../boom/index.d.ts"] } })).toEqual([]);
|
|
32
|
-
});
|
|
33
|
-
it("disallows missing `module`", () => {
|
|
34
|
-
const options = { ...base };
|
|
35
|
-
delete options.module;
|
|
36
|
-
expect(checkTsconfig("test", options)).toEqual([
|
|
37
|
-
'Must specify "module" to `"module": "commonjs"` or `"module": "node16"`.',
|
|
38
|
-
]);
|
|
39
|
-
});
|
|
40
|
-
it("disallows exactOptionalPropertyTypes: false", () => {
|
|
41
|
-
expect(checkTsconfig("test", { ...base, exactOptionalPropertyTypes: false })).toEqual([
|
|
42
|
-
'When "exactOptionalPropertyTypes" is present, it must be set to `true`.',
|
|
43
|
-
]);
|
|
44
|
-
});
|
|
45
|
-
it("allows paths: self-reference", () => {
|
|
46
|
-
expect(checkTsconfig("react-native", { ...base, paths: { "react-native": ["./index.d.ts"] } })).toEqual([]);
|
|
47
|
-
});
|
|
48
|
-
it("allows paths: matching ../reference/index.d.ts", () => {
|
|
49
|
-
expect(
|
|
50
|
-
checkTsconfig("reactive-dep", { ...base, paths: { "react-native": ["../react-native/index.d.ts"] } }),
|
|
51
|
-
).toEqual([]);
|
|
52
|
-
expect(
|
|
53
|
-
checkTsconfig("reactive-dep", {
|
|
54
|
-
...base,
|
|
55
|
-
paths: { "react-native": ["../react-native/index.d.ts"], react: ["../react/v16/index.d.ts"] },
|
|
56
|
-
}),
|
|
57
|
-
).toEqual([]);
|
|
58
|
-
});
|
|
59
|
-
it("forbids paths: mapping to multiple things", () => {
|
|
60
|
-
expect(
|
|
61
|
-
checkTsconfig("reactive-dep", {
|
|
62
|
-
...base,
|
|
63
|
-
paths: { "react-native": ["./index.d.ts", "../react-native/v0.68/index.d.ts"] },
|
|
64
|
-
}),
|
|
65
|
-
).toEqual([`reactive-dep/tsconfig.json: "paths" must map each module specifier to only one file.`]);
|
|
66
|
-
});
|
|
67
|
-
it("allows paths: matching ../reference/version/index.d.ts", () => {
|
|
68
|
-
expect(checkTsconfig("reactive-dep", { ...base, paths: { react: ["../react/v16/index.d.ts"] } })).toEqual([]);
|
|
69
|
-
expect(
|
|
70
|
-
checkTsconfig("reactive-dep", { ...base, paths: { "react-native": ["../react-native/v0.69/index.d.ts"] } }),
|
|
71
|
-
).toEqual([]);
|
|
72
|
-
expect(
|
|
73
|
-
checkTsconfig("reactive-dep/v1", {
|
|
74
|
-
...base,
|
|
75
|
-
paths: { "react-native": ["../../react-native/v0.69/index.d.ts"] },
|
|
76
|
-
}),
|
|
77
|
-
).toEqual([]);
|
|
78
|
-
});
|
|
79
|
-
it("forbids paths: mapping to self-contained file", () => {
|
|
80
|
-
expect(checkTsconfig("rrrr", { ...base, paths: { "react-native": ["./other.d.ts"] } })).toEqual([
|
|
81
|
-
`rrrr/tsconfig.json: "paths" must map 'react-native' to react-native's index.d.ts.`,
|
|
82
|
-
]);
|
|
83
|
-
});
|
|
84
|
-
it("forbids paths: mismatching ../NOT/index.d.ts", () => {
|
|
85
|
-
expect(checkTsconfig("rrrr", { ...base, paths: { "react-native": ["../cocoa/index.d.ts"] } })).toEqual([
|
|
86
|
-
`rrrr/tsconfig.json: "paths" must map 'react-native' to react-native's index.d.ts.`,
|
|
87
|
-
]);
|
|
88
|
-
});
|
|
89
|
-
it("forbids paths: mismatching ../react-native/NOT.d.ts", () => {
|
|
90
|
-
expect(checkTsconfig("rrrr", { ...base, paths: { "react-native": ["../react-native/other.d.ts"] } })).toEqual([
|
|
91
|
-
`rrrr/tsconfig.json: "paths" must map 'react-native' to react-native's index.d.ts.`,
|
|
92
|
-
]);
|
|
93
|
-
});
|
|
94
|
-
it("forbids paths: mismatching ../react-native/NOT/index.d.ts", () => {
|
|
95
|
-
expect(
|
|
96
|
-
checkTsconfig("rrrr", { ...base, paths: { "react-native": ["../react-native/deep/index.d.ts"] } }),
|
|
97
|
-
).toEqual([`rrrr/tsconfig.json: "paths" must map 'react-native' to react-native's index.d.ts.`]);
|
|
98
|
-
});
|
|
99
|
-
it("forbids paths: mismatching ../react-native/version/NOT/index.d.ts", () => {
|
|
100
|
-
expect(
|
|
101
|
-
checkTsconfig("rrrr", { ...base, paths: { "react-native": ["../react-native/v0.68/deep/index.d.ts"] } }),
|
|
102
|
-
).toEqual([`rrrr/tsconfig.json: "paths" must map 'react-native' to react-native's index.d.ts.`]);
|
|
103
|
-
});
|
|
104
|
-
it("forbids paths: mismatching ../react-native/version/NOT.d.ts", () => {
|
|
105
|
-
expect(
|
|
106
|
-
checkTsconfig("rrrr", { ...base, paths: { "react-native": ["../react-native/v0.70/other.d.ts"] } }),
|
|
107
|
-
).toEqual([`rrrr/tsconfig.json: "paths" must map 'react-native' to react-native's index.d.ts.`]);
|
|
108
|
-
});
|
|
109
|
-
});
|
|
110
|
-
describe("assertPackageIsNotDeprecated", () => {
|
|
111
|
-
it("disallows packages that are in notNeededPackages.json", () => {
|
|
112
|
-
expect(() => assertPackageIsNotDeprecated("foo", '{ "packages": { "foo": { } } }')).toThrow(
|
|
113
|
-
"notNeededPackages.json has an entry for foo.",
|
|
114
|
-
);
|
|
115
|
-
});
|
|
116
|
-
it("allows packages that are not in notNeededPackages.json", () => {
|
|
117
|
-
expect(assertPackageIsNotDeprecated("foo", '{ "packages": { "bar": { } } }')).toBeUndefined();
|
|
118
|
-
});
|
|
119
|
-
});
|
|
120
|
-
});
|
|
121
|
-
});
|
package/test/tsconfig.json
DELETED
package/tsconfig.json
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../tsconfig.base.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"outDir": "dist",
|
|
5
|
-
"rootDir": "src"
|
|
6
|
-
},
|
|
7
|
-
"include": ["src", "src/rules"],
|
|
8
|
-
"references": [
|
|
9
|
-
{ "path": "../dts-critic" },
|
|
10
|
-
{ "path": "../header-parser" },
|
|
11
|
-
{ "path": "../typescript-versions" },
|
|
12
|
-
{ "path": "../utils" }
|
|
13
|
-
]
|
|
14
|
-
}
|
package/tsconfig.tsbuildinfo
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"program":{"fileNames":["../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../typescript-versions/dist/index.d.ts","../header-parser/dist/index.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/typescript.d.ts","../utils/dist/assertions.d.ts","../utils/dist/async.d.ts","../utils/dist/collections.d.ts","../utils/dist/fs.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/assert.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/assert/strict.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/globals.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/async_hooks.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/buffer.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/child_process.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/cluster.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/console.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/constants.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/crypto.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/dgram.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/dns.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/dns/promises.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/domain.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/events.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/fs.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/fs/promises.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/http.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/http2.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/https.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/inspector.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/module.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/net.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/os.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/path.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/perf_hooks.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/process.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/punycode.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/querystring.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/readline.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/repl.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/stream.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/stream/promises.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/stream/consumers.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/stream/web.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/string_decoder.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/test.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/timers.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/timers/promises.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/tls.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/trace_events.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/tty.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/url.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/util.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/v8.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/vm.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/wasi.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/worker_threads.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/zlib.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/globals.global.d.ts","../../node_modules/.pnpm/@types+node@16.18.61/node_modules/@types/node/index.d.ts","../utils/dist/logging.d.ts","../utils/dist/io.d.ts","../utils/dist/miscellany.d.ts","../utils/dist/npm.d.ts","../utils/dist/process.d.ts","../utils/dist/progress.d.ts","../utils/dist/typescript-installer.d.ts","../utils/dist/index.d.ts","../../node_modules/.pnpm/strip-json-comments@3.1.1/node_modules/strip-json-comments/index.d.ts","./src/util.ts","./src/checks.ts","./src/createProgram.ts","../../node_modules/.pnpm/@types+eslint@8.44.7/node_modules/@types/eslint/helpers.d.ts","../../node_modules/.pnpm/@types+estree@1.0.5/node_modules/@types/estree/index.d.ts","../../node_modules/.pnpm/@types+json-schema@7.0.15/node_modules/@types/json-schema/index.d.ts","../../node_modules/.pnpm/@types+eslint@8.44.7/node_modules/@types/eslint/index.d.ts","../../node_modules/.pnpm/@typescript-eslint+types@6.11.0/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts","../../node_modules/.pnpm/@typescript-eslint+types@6.11.0/node_modules/@typescript-eslint/types/dist/lib.d.ts","../../node_modules/.pnpm/@typescript-eslint+types@6.11.0/node_modules/@typescript-eslint/types/dist/parser-options.d.ts","../../node_modules/.pnpm/@typescript-eslint+types@6.11.0/node_modules/@typescript-eslint/types/dist/ts-estree.d.ts","../../node_modules/.pnpm/@typescript-eslint+types@6.11.0/node_modules/@typescript-eslint/types/dist/index.d.ts","../../node_modules/.pnpm/@typescript-eslint+typescript-estree@6.11.0_typescript@5.2.2/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.d.ts","../../node_modules/.pnpm/@typescript-eslint+typescript-estree@6.11.0_typescript@5.2.2/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.d.ts","../../node_modules/.pnpm/@typescript-eslint+typescript-estree@6.11.0_typescript@5.2.2/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/index.d.ts","../../node_modules/.pnpm/@typescript-eslint+typescript-estree@6.11.0_typescript@5.2.2/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts","../../node_modules/.pnpm/@typescript-eslint+typescript-estree@6.11.0_typescript@5.2.2/node_modules/@typescript-eslint/typescript-estree/dist/parser.d.ts","../../node_modules/.pnpm/@typescript-eslint+visitor-keys@6.11.0/node_modules/@typescript-eslint/visitor-keys/dist/get-keys.d.ts","../../node_modules/.pnpm/@typescript-eslint+visitor-keys@6.11.0/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.d.ts","../../node_modules/.pnpm/@typescript-eslint+visitor-keys@6.11.0/node_modules/@typescript-eslint/visitor-keys/dist/index.d.ts","../../node_modules/.pnpm/@typescript-eslint+typescript-estree@6.11.0_typescript@5.2.2/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.d.ts","../../node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/tsserverlibrary.d.ts","../../node_modules/.pnpm/@typescript-eslint+typescript-estree@6.11.0_typescript@5.2.2/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.d.ts","../../node_modules/.pnpm/@typescript-eslint+typescript-estree@6.11.0_typescript@5.2.2/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.d.ts","../../node_modules/.pnpm/@typescript-eslint+typescript-estree@6.11.0_typescript@5.2.2/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts","../../node_modules/.pnpm/@typescript-eslint+typescript-estree@6.11.0_typescript@5.2.2/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.d.ts","../../node_modules/.pnpm/@typescript-eslint+typescript-estree@6.11.0_typescript@5.2.2/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.d.ts","../../node_modules/.pnpm/@typescript-eslint+typescript-estree@6.11.0_typescript@5.2.2/node_modules/@typescript-eslint/typescript-estree/dist/version-check.d.ts","../../node_modules/.pnpm/@typescript-eslint+typescript-estree@6.11.0_typescript@5.2.2/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.d.ts","../../node_modules/.pnpm/@typescript-eslint+typescript-estree@6.11.0_typescript@5.2.2/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.d.ts","../../node_modules/.pnpm/@typescript-eslint+typescript-estree@6.11.0_typescript@5.2.2/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.d.ts","../../node_modules/.pnpm/@typescript-eslint+typescript-estree@6.11.0_typescript@5.2.2/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts","./src/lint.ts","./src/index.ts"],"fileInfos":[{"version":"2ac9cdcfb8f8875c18d14ec5796a8b029c426f73ad6dc3ffb580c228b58d1c44","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","impliedFormat":1},{"version":"9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","impliedFormat":1},{"version":"f296963760430fb65b4e5d91f0ed770a91c6e77455bacf8fa23a1501654ede0e","affectsGlobalScope":true,"impliedFormat":1},{"version":"09226e53d1cfda217317074a97724da3e71e2c545e18774484b61562afc53cd2","affectsGlobalScope":true,"impliedFormat":1},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true,"impliedFormat":1},{"version":"8b41361862022eb72fcc8a7f34680ac842aca802cf4bc1f915e8c620c9ce4331","affectsGlobalScope":true,"impliedFormat":1},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true,"impliedFormat":1},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true,"impliedFormat":1},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true,"impliedFormat":1},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true,"impliedFormat":1},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true,"impliedFormat":1},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true,"impliedFormat":1},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true,"impliedFormat":1},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true,"impliedFormat":1},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true,"impliedFormat":1},{"version":"b7e9f95a7387e3f66be0ed6db43600c49cec33a3900437ce2fd350d9b7cb16f2","affectsGlobalScope":true,"impliedFormat":1},{"version":"01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true,"impliedFormat":1},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true,"impliedFormat":1},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true,"impliedFormat":1},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true,"impliedFormat":1},{"version":"9cc66b0513ad41cb5f5372cca86ef83a0d37d1c1017580b7dace3ea5661836df","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"709efdae0cb5df5f49376cde61daacc95cdd44ae4671da13a540da5088bf3f30","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc496ef4377553e461efcf7cc5a5a57cf59f9962aea06b5e722d54a36bf66ea1","affectsGlobalScope":true,"impliedFormat":1},{"version":"038a2f66a34ee7a9c2fbc3584c8ab43dff2995f8c68e3f566f4c300d2175e31e","affectsGlobalScope":true,"impliedFormat":1},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true,"impliedFormat":1},{"version":"f5c92f2c27b06c1a41b88f6db8299205aee52c2a2943f7ed29bd585977f254e8","affectsGlobalScope":true,"impliedFormat":1},{"version":"930b0e15811f84e203d3c23508674d5ded88266df4b10abee7b31b2ac77632d2","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"b9ea5778ff8b50d7c04c9890170db34c26a5358cccba36844fe319f50a43a61a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true,"impliedFormat":1},{"version":"307c8b7ebbd7f23a92b73a4c6c0a697beca05b06b036c23a34553e5fe65e4fdc","affectsGlobalScope":true,"impliedFormat":1},{"version":"f35a831e4f0fe3b3697f4a0fe0e3caa7624c92b78afbecaf142c0f93abfaf379","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"0008912044595ce4a7eab39a758ecb3ab7117491e465007e74af0097e703672c","impliedFormat":1},{"version":"28c37b4d66799ca312509e2a3f086b5d42495e015f07b2d2276e943f323473c9","impliedFormat":1},{"version":"375387db607fc72d59f4e65e3cfd86cbfa636aecf33d9d4c6015fd7d95ca42af","impliedFormat":1},{"version":"d9abd0a8e4f9ee2e1459259963c2ffe0499cd39fca6c0aee1dcaf77b8236bf9e","impliedFormat":1},{"version":"94e879c6ca08ed7267b78a31f6c4556edaf02f13a46dbefe27c84dfb4114ab9b","impliedFormat":1},{"version":"8cf36bcc87aefd0a7bc19ea0574197d8d4851e83f93dc9a0abe02e93db88ac83","impliedFormat":1},{"version":"1d5d145cdb16e037207de59fdd54054720d2179fac7238c83b694362fd3439b0","impliedFormat":1},{"version":"34693fb4a5e771e11668219221344dd1bd7d8b77ed005a1c1d965fb559be8406","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"e44ea2d6b7b853f6c81482416db43dafc11944561b810e469ae423085511ce7e","affectsGlobalScope":true,"impliedFormat":1},{"version":"f51b4042a3ac86f1f707500a9768f88d0b0c1fc3f3e45a73333283dea720cdc6","impliedFormat":1},{"version":"a7289d79eb84a59d2475b4d0136b4404be3cfdd17c3ea46b9194add1d645df01","affectsGlobalScope":true,"impliedFormat":1},{"version":"0bb26fa2a90ee890eed57ee812c71fa84d3d07850163ec4a204de86412cc57c1","impliedFormat":1},{"version":"132ca47da601c60141dd6f10bd08c70d0620177e5638439df2464ec3945b6d98","impliedFormat":1},{"version":"55d2bbae076fed7269c3e16faeb32f988f558427b7a1c3bf04aa7551ab86ae90","affectsGlobalScope":true,"impliedFormat":1},{"version":"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","impliedFormat":1},{"version":"cf83847c9264dcd592b6c89c1542925b899b277228687f3638614e3fa784cf76","impliedFormat":1},{"version":"3a41ebe7f089d50f447466b35b6cabb8b584c0994fc9809d0cd0a4ebc41e1239","impliedFormat":1},{"version":"7693b90b3075deaccafd5efb467bf9f2b747a3075be888652ef73e64396d8628","impliedFormat":1},{"version":"0c42d6cba77d9ad1cf45256ccb8489aa502fe2dbee1ec9048a29d49f5d532e73","impliedFormat":1},{"version":"2cf89c17245db65d175d4ef699cd68187516f9b3ae5c572fc0b9ad60f35dc223","impliedFormat":1},{"version":"5f20d20b7607174caf1a6da9141aeb9f2142159ae2410ca30c7a0fccd1d19c99","impliedFormat":1},{"version":"a0c0e3bf3e8dc9454cdca64c6234c1a698a4368f2a461a7153ce274db0e96ecc","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d42e5af5fb0a96a77e135ce84cc60636c9bad39d9dba043a4efe9d1bdeb3cc3","impliedFormat":1},{"version":"56fcc451e9065eb121c9cc4c1b9994a816306f3b0b3b1fce7ad59f0ac97a9999","impliedFormat":1},{"version":"65fd34269572542bb63331ee53279cebd3d1f1c117086e9d1346f85fdd6773ab","impliedFormat":1},{"version":"c3759b5bc5cc40f5988d86a497741a80fa91258629ae50a2b3735e774cd377cc","impliedFormat":1},{"version":"bf268a0aea37ad4ae3b7a9b58559190b6fc01ea16a31e35cd05817a0a60f895a","impliedFormat":1},{"version":"f238f3c4409b45a3fda3de9723a7ff8ec62dfd7f47eb09e67cf0aa6bda78780d","impliedFormat":1},{"version":"d7dad6db394a3d9f7b49755e4b610fbf8ed6eb0c9810ae5f1a119f6b5d76de45","affectsGlobalScope":true,"impliedFormat":1},{"version":"8058b50d648acc321cf77fedea9f56947441f9f1c2fcccdb7d841745fb7ecb54","impliedFormat":1},{"version":"bf755525c4e6f85a970b98c4755d98e8aa1b6dbd83a5d8fcc57d3d497351b936","impliedFormat":1},{"version":"dd67d2b5e4e8a182a38de8e69fb736945eaa4588e0909c14e01a14bd3cc1fd1e","impliedFormat":1},{"version":"9cdc2c6144b03822c9842505d09945bcf813b86827fdb260dd7586b63abc19bf","affectsGlobalScope":true,"impliedFormat":1},{"version":"2923dee3c897f03e91b54a210cdbefea7290562f0ac4b948667d4c9ee844b79e","affectsGlobalScope":true,"impliedFormat":1},{"version":"79169698d09a2be54b14f3bcad2575b414bf3525063fde0a1e4fcd5d6efd380e","impliedFormat":1},{"version":"051d939bcf77caa3cef3282708ab3a6fdfb741a7366e1d74a9e7603b67417ec3","impliedFormat":1},{"version":"0be79b3ff0f16b6c2f9bc8c4cc7097ea417d8d67f8267f7e1eec8e32b548c2ff","impliedFormat":1},{"version":"1c61ffa3a71b77363b30d19832c269ef62fba787f5610cac7254728d3b69ab2e","impliedFormat":1},{"version":"a234d62ae81d012ebf23898a45672edf3e5c93ecf5a438a42b96c08dd68cde43","impliedFormat":1},{"version":"269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","impliedFormat":1},{"version":"6e191fea1db6e9e4fa828259cf489e820ec9170effff57fb081a2f3295db4722","impliedFormat":1},{"version":"09d801ff4a303d4976d4b9cb94af3a9097c4a70345e662d176975872d2998e51","impliedFormat":1},{"version":"c8558b01389b5f7610ac293aa612ccea2ae64d83af43b49f8142f190be1f414c","impliedFormat":1},{"version":"c40fdf7b2e18df49ce0568e37f0292c12807a0748be79e272745e7216bed2606","impliedFormat":1},{"version":"b10b426c56e220b5093bf8a2446ee47af47263b7b1a03f4b18e42326b231b111","affectsGlobalScope":true,"impliedFormat":1},{"version":"4e228e78c1e9b0a75c70588d59288f63a6258e8b1fe4a67b0c53fe03461421d9","impliedFormat":1},{"version":"b4635ef36bee17e1304337d591c3b6b461ecdbc1876d0effbe6a581e62201fe5","impliedFormat":1},{"version":"205d50c24359ead003dc537b9b65d2a64208dfdffe368f403cf9e0357831db9e","impliedFormat":1},{"version":"1265fddcd0c68be9d2a3b29805d0280484c961264dd95e0b675f7bd91f777e78","impliedFormat":1},{"version":"e4507242542bd499238f693d88b2d32e22177cc508854625f87bcc9bc3fa1256","affectsGlobalScope":true,"impliedFormat":1},{"version":"d942354e4966a98d3a92d1b1af0b4ac06f33af3f88116743e2c304c027ca26ef","affectsGlobalScope":true,"impliedFormat":1},{"version":"39f0808e5be3cb38674726c21fe2eb453c55e48a901679b4ce30fef85549b892","impliedFormat":1},{"version":"6afd66a7432ef100027ea110449e874196381e019e30eda7e7d8ca390366b7a8","impliedFormat":1},{"version":"befb8a9a78ac99d8fbc3ed392810489a7b90760c7a58934e8f1c8538f581cff3","impliedFormat":1},{"version":"e670bdf01540d35c170fae68edfd2f288eff909936780c379d6a9103b787b22c","impliedFormat":1},{"version":"867f95abf1df444aab146b19847391fc2f922a55f6a970a27ed8226766cee29f","impliedFormat":1},{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true,"impliedFormat":1},{"version":"41e3968eb33a5bae4b9072ee87652289007d45190c1cb269985d4325a5b24da0","impliedFormat":1},{"version":"4bafa3897a66e2cb7134840c1c3c49f4c2a02cff51c9b714853e6ac773c6e7a9","impliedFormat":1},{"version":"cec583a69b1c607472e5e0387f9f99a2f942d6a7df72ce5944aba8879518edd2","impliedFormat":1},{"version":"0ad46c1a967115a25dcb9613a0b7c068d44abddd974326d2304002dddb8133b2","impliedFormat":1},{"version":"9c3d444a3c3bf3b4b886df5b25e32b65f8e4ce6259de0e65ee450d658743be59","impliedFormat":1},{"version":"ad74225c7e3c68e5c880671cfe54ed3d205d94c1244c54a6174e74649e24a8fb","impliedFormat":1},{"version":"88bdf0f442cc1672a0b28e2676f75627492afd43a7c517f223da3f42fdadece1","impliedFormat":1},{"version":"2284530dbb246989b587d6d0aa8a54307b87902a0fecf007cd5cd817889f494d","impliedFormat":1},{"version":"5eaa1112a996927a1216ea5da6aea4b8acaa3e01f1cb8d9545b18ceb24bcf5aa","impliedFormat":1},{"version":"86f29585ea328bb5877ed912a4f064f772fa3f20a7ccc0f63b8ae48e333769b1","impliedFormat":1},{"version":"2a82f56025064b9a77f7a5f4c331a4e1ee6cc133839e575db72eca2277ea6f6a","signature":"df0f4450873ce1e37ceb703a9c12dddb637bff992ce6e2746093f272965290ed","impliedFormat":1},{"version":"ed1a6154833db3f1646958a98a6bb164ebca2c0646c1e779630bb3d8c563f048","signature":"0c36a764e866f395918dc3a3222d7f17e5801bf0cefde9c52d5faff17629d8ba","impliedFormat":1},{"version":"23644e58738b17797efd9b749bea8b4c3fa6d03264c0106562834ba090b86276","signature":"f4473f9003f06a8790d051e157a68a20780af67c8e463fe88e33e7aadedfe490","impliedFormat":1},{"version":"64d4b35c5456adf258d2cf56c341e203a073253f229ef3208fc0d5020253b241","affectsGlobalScope":true,"impliedFormat":1},{"version":"ee7d8894904b465b072be0d2e4b45cf6b887cdba16a467645c4e200982ece7ea","impliedFormat":1},{"version":"f3d8c757e148ad968f0d98697987db363070abada5f503da3c06aefd9d4248c1","impliedFormat":1},{"version":"df95e00612c1faa5e0e7ef0dba589b18665bbeb3221db2b6cee1fe4d0e61921f","impliedFormat":1},{"version":"38738b94918d3119aa7006a143ec3f1552726348c80ee9b2de3606b9d78be223","impliedFormat":1},{"version":"ac5c6aefe784ae554ccef97ab165378535dc055402198667b75a4909387e7e8a","impliedFormat":1},{"version":"01b126c3cbc63a63dd4b725042f0a0f9e44ad5773a65cf8efb8c9cb6f7bcc288","impliedFormat":1},{"version":"fcf764882c18b958c2a487ad1093d6c9630df63f1e90995b157fe052e9fcc632","impliedFormat":1},{"version":"92ebc3261b20037c4e078cd3d26bccedb719b3eec653925e103b6ced4a936c0d","impliedFormat":1},{"version":"d82d7a1205e9ead3f6503ba41207f96a2a6f3d54613e4de6ba9b1b9e8b47bc9f","impliedFormat":1},{"version":"eac23d66e74253c09e8d5cc40721b266c1991c4deee423e768c4c40c42073035","impliedFormat":1},{"version":"7c6ad54ea23ada6d5573084dd2cc7a4e5850245ec6e39bd3af6a09572cef6ff4","impliedFormat":1},{"version":"31573cbc2e73e351a7c7f65ef1b98500e0370feea1fd0d542e8e25ca89acdffa","impliedFormat":1},{"version":"4db3355a7ec7c08b53f649f1cb202940d296a3664edc636da349f778be092a58","impliedFormat":1},{"version":"b181ff38cfb4c79fb7aa7ef163c06e84fe5b0c3b7a286848a0eaa5b2ec38c706","impliedFormat":1},{"version":"a8c65d6931f57824f95012e902b3c4aaed39aa655183d13a7f7487dcb1bcbf00","impliedFormat":1},{"version":"9a5cece9b6895a117590afa088b6b91db167e25b00e5de1cb5885898fad0a270","impliedFormat":1},{"version":"4d567f85f7734b209da4129603c0ceb307209d9de0e4abdae83ba2916032ce29","impliedFormat":1},{"version":"f9c2563439fc156b5d08d92ba998db0cd1302e65f8bb29a21eae42f97ff4ee6c","impliedFormat":1},{"version":"9cc8c4df4bfed4e4b9da63e18d1568e1b885f38e73f735e447c0ce0d8c0b848b","impliedFormat":1},{"version":"daccf8e3adc587b94fa66367cab7c1d2380165d90139c09394f7003d736c4b67","impliedFormat":1},{"version":"29ac96666b3a92086e8a704580f5f8437337ad80ef948be324de25637d56b3c4","impliedFormat":1},{"version":"3884455a26771bbc6f010da73045949047b5949fc24881e21fafdca913fb40cf","impliedFormat":1},{"version":"2c757867a2d1c49a365da450bd4dbaf0c5facc7f0434c5ce647a8293e49dc453","impliedFormat":1},{"version":"87a714642be4042162972ed9aa51c52893325e707e1a0343ef6372815f42d4df","impliedFormat":1},{"version":"5d1201e776c3167527653c835035e4ad29cd79e0d6b139aa250ca74899e0741e","impliedFormat":1},{"version":"f56ac570386d21d28403947863db9d4a248a9235d5afd519547e8937cf7887fc","impliedFormat":1},{"version":"9acc441d14a127dea0228cd2645203c3285b296f452f723f850dc2941d2b9c7e","impliedFormat":1},{"version":"dc8405dfcfcf77ddfff1cdf02bbc715733618325559d30f228d116b7c3a591f5","impliedFormat":1},{"version":"80e7cc7552758d12c7b964ac2434cc986d02fddaf785c325fadbd41d18ee6f9f","signature":"845d30b30c2ecdc39804a6ad8f08bfff6bc72249f1ed5b7e763828d76eba2762","impliedFormat":1},{"version":"a3c824d3106c758cd40d2ad171671fa78f9172a095c0860950dc8b18c179a9fa","signature":"7c144b6b6774f02ebfd419375ecf9059b5f60b3d0cd402913d6722feeb5bb217","impliedFormat":1}],"root":[[126,128],158,159],"options":{"allowUnreachableCode":false,"allowUnusedLabels":false,"composite":true,"esModuleInterop":true,"module":100,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./dist","rootDir":"./src","sourceMap":true,"strict":true,"target":6},"fileIdsList":[[109],[109,129,130,131],[65,109],[68,109],[69,74,100,109],[70,80,81,88,97,108,109],[70,71,80,88,109],[72,109],[73,74,81,89,109],[74,97,105,109],[75,77,80,88,109],[76,109],[77,78,109],[79,80,109],[68,80,109],[80,81,82,97,108,109],[80,81,82,97,109],[80,83,88,97,108,109],[80,81,83,84,88,97,105,108,109],[83,85,97,105,108,109],[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115],[80,86,109],[87,108,109,113],[77,80,88,97,109],[89,109],[90,109],[68,91,109],[92,107,109,113],[93,109],[94,109],[80,95,109],[95,96,109,111],[69,80,97,98,99,109],[69,97,99,109],[97,98,109],[100,109],[101,109],[80,103,104,109],[103,104,109],[74,88,105,109],[106,109],[88,107,109],[69,83,94,108,109],[74,109],[97,109,110],[109,111],[109,112],[69,74,80,82,91,97,108,109,111,113],[97,109,114],[60,109],[109,133,134,135,136],[60,109,134],[109,133,136],[60,109,149],[60,109,150],[109,140,141,142,146,150,151,152,153,154,155,156],[60,109,140],[109,137],[60,109,140,147,148,150],[60,109,137,140],[60,109,140,141],[109,140,145],[60,109,137,138],[109,137,138,139],[109,143,144],[58,59,60,81,90,109,124,126],[60,81,90,109],[58,59,65,81,90,109,124,126,127,158],[58,60,65,90,109,124,128,132,157],[60,81,90,109,125],[58,109],[61,62,63,64,109,117,118,119,120,121,122,123],[64,85,109,116,117],[109,117],[70,109,116],[58,59,60],[60],[58,60]],"referencedMap":[[129,1],[132,2],[130,1],[131,1],[65,3],[66,3],[68,4],[69,5],[70,6],[71,7],[72,8],[73,9],[74,10],[75,11],[76,12],[77,13],[78,13],[79,14],[80,15],[81,16],[82,17],[67,1],[115,1],[83,18],[84,19],[85,20],[116,21],[86,22],[87,23],[88,24],[89,25],[90,26],[91,27],[92,28],[93,29],[94,30],[95,31],[96,32],[97,33],[99,34],[98,35],[100,36],[101,37],[102,1],[103,38],[104,39],[105,40],[106,41],[107,42],[108,43],[109,44],[110,45],[111,46],[112,47],[113,48],[114,49],[133,50],[137,51],[134,1],[135,52],[136,53],[156,1],[152,50],[150,54],[151,55],[154,50],[157,56],[155,57],[148,58],[149,59],[141,60],[142,61],[146,62],[139,63],[140,64],[138,50],[153,1],[143,58],[145,65],[144,1],[125,1],[56,1],[57,1],[11,1],[10,1],[2,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[3,1],[4,1],[20,1],[24,1],[21,1],[22,1],[23,1],[25,1],[26,1],[27,1],[5,1],[28,1],[29,1],[30,1],[31,1],[6,1],[35,1],[32,1],[33,1],[34,1],[36,1],[7,1],[37,1],[42,1],[43,1],[38,1],[39,1],[40,1],[41,1],[8,1],[47,1],[44,1],[45,1],[46,1],[48,1],[9,1],[49,1],[50,1],[51,1],[54,1],[52,1],[53,1],[1,1],[55,1],[147,1],[60,1],[127,66],[128,67],[159,68],[158,69],[126,70],[59,71],[58,1],[61,1],[62,1],[63,1],[64,1],[124,72],[118,73],[117,1],[119,1],[120,74],[121,75],[122,1],[123,71]],"exportedModulesMap":[[129,1],[132,2],[130,1],[131,1],[65,3],[66,3],[68,4],[69,5],[70,6],[71,7],[72,8],[73,9],[74,10],[75,11],[76,12],[77,13],[78,13],[79,14],[80,15],[81,16],[82,17],[67,1],[115,1],[83,18],[84,19],[85,20],[116,21],[86,22],[87,23],[88,24],[89,25],[90,26],[91,27],[92,28],[93,29],[94,30],[95,31],[96,32],[97,33],[99,34],[98,35],[100,36],[101,37],[102,1],[103,38],[104,39],[105,40],[106,41],[107,42],[108,43],[109,44],[110,45],[111,46],[112,47],[113,48],[114,49],[133,50],[137,51],[134,1],[135,52],[136,53],[156,1],[152,50],[150,54],[151,55],[154,50],[157,56],[155,57],[148,58],[149,59],[141,60],[142,61],[146,62],[139,63],[140,64],[138,50],[153,1],[143,58],[145,65],[144,1],[125,1],[56,1],[57,1],[11,1],[10,1],[2,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[3,1],[4,1],[20,1],[24,1],[21,1],[22,1],[23,1],[25,1],[26,1],[27,1],[5,1],[28,1],[29,1],[30,1],[31,1],[6,1],[35,1],[32,1],[33,1],[34,1],[36,1],[7,1],[37,1],[42,1],[43,1],[38,1],[39,1],[40,1],[41,1],[8,1],[47,1],[44,1],[45,1],[46,1],[48,1],[9,1],[49,1],[50,1],[51,1],[54,1],[52,1],[53,1],[1,1],[55,1],[147,1],[60,1],[127,76],[128,77],[158,78],[126,77],[59,71],[58,1],[61,1],[62,1],[63,1],[64,1],[124,72],[118,73],[117,1],[119,1],[120,74],[121,75],[122,1],[123,71]],"semanticDiagnosticsPerFile":[129,132,130,131,65,66,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,67,115,83,84,85,116,86,87,88,89,90,91,92,93,94,95,96,97,99,98,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,133,137,134,135,136,156,152,150,151,154,157,155,148,149,141,142,146,139,140,138,153,143,145,144,125,56,57,11,10,2,12,13,14,15,16,17,18,19,3,4,20,24,21,22,23,25,26,27,5,28,29,30,31,6,35,32,33,34,36,7,37,42,43,38,39,40,41,8,47,44,45,46,48,9,49,50,51,54,52,53,1,55,147,60,127,128,159,158,126,59,58,61,62,63,64,124,118,117,119,120,121,122,123],"latestChangedDtsFile":"./dist/index.d.ts"},"version":"5.2.2"}
|