Skip to content

Commit edc9b48

Browse files
committed
refactor: resolve types config
1 parent 27adefa commit edc9b48

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/utils/getProjectDeps.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { getProjectDirectory } from "./getProjectDir";
2-
import { readPackageJSON } from "pkg-types";
32
import { existsSync } from 'fs';
43

54
type Dependency = {
@@ -14,6 +13,7 @@ export const getProjectDependencies = async (): Promise<Dependency[]> => {
1413
if (!existsSync(packageJsonPath)) {
1514
return [];
1615
} else {
16+
const { readPackageJSON } = await import("pkg-types");
1717
const packageJSON = await readPackageJSON(packageJsonPath);
1818

1919
const addDependencies = (depObj: Record<string, string> | undefined) => {
@@ -31,4 +31,4 @@ export const getProjectDependencies = async (): Promise<Dependency[]> => {
3131

3232
return dependencies;
3333
}
34-
};
34+
};

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
],
88
"sourceMap": true,
99
"rootDir": "src",
10-
"strict": true /* enable all strict type-checking options */
10+
"strict": true,
11+
"skipLibCheck": true /* enable all strict type-checking options */
1112
/* Additional Checks */
1213
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
1314
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */

0 commit comments

Comments
 (0)