Skip to content

Commit 44f696c

Browse files
authored
chore: fix tsc not checking src/* (#1035)
1 parent 14489a7 commit 44f696c

File tree

8 files changed

+26
-16
lines changed

8 files changed

+26
-16
lines changed

.config/tsconfig.base.json

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,29 @@
44
],
55
"compilerOptions": {
66
"noFallthroughCasesInSwitch": true,
7+
"noImplicitAny": true,
78
"noImplicitOverride": true,
89
"noImplicitReturns": true,
10+
"noImplicitThis": true,
911
"noPropertyAccessFromIndexSignature": true,
1012
"noUnusedLocals": true,
1113
"noUnusedParameters": true,
1214
"strict": true,
13-
"moduleResolution": "node",
15+
"module": "CommonJS",
16+
"moduleResolution": "Node",
1417
"resolveJsonModule": true,
15-
"strictNullChecks": true,
18+
"declaration": true,
19+
"declarationMap": true,
20+
"sourceMap": true,
1621
"allowJs": true,
1722
"checkJs": true,
18-
"allowSyntheticDefaultImports": true,
23+
"esModuleInterop": true,
1924
"forceConsistentCasingInFileNames": true,
25+
"isolatedModules": true,
2026
"jsx": "react",
2127
"target": "ESNext",
22-
"skipLibCheck": true
28+
"pretty": true,
29+
"skipLibCheck": true,
30+
"skipDefaultLibCheck": true
2331
}
2432
}

packages/api/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"@types/jest": "29.5.4",
3535
"eslint": "^8.54.0",
3636
"jest": "29.5.0",
37+
"prettier": "^2.8.8",
3738
"react-native-builder-bob": "0.20.0",
3839
"ts-jest": "29.1.1",
3940
"typescript": "^5.3.0"

packages/api/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export { AsyncStorage } from "./AsyncStorage";
1+
export type { AsyncStorage } from "./AsyncStorage";
22
export type { StorageExtension } from "./StorageExtension";
33
export type { StorageKeys, StorageModel } from "./StorageModel";

packages/api/tsconfig.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"extends": "../../.config/tsconfig.base.json",
3-
"include": ["./src/**/*", "./example/**/*"],
4-
"compilerOptions": {
5-
"types": ["jest"]
6-
}
2+
"extends": "../../.config/tsconfig.base.json",
3+
"compilerOptions": {
4+
"types": ["jest"]
5+
},
6+
"include": ["example", "src"]
77
}

packages/default-storage/src/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export function convertError(error?: ErrorLike): Error | null {
5353
return null;
5454
}
5555

56-
const out = new Error(error.message);
56+
const out = new Error(error.message) as Error & ErrorLike;
5757
out["key"] = error.key;
5858
return out;
5959
}

packages/default-storage/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export type ErrorLike = {
22
message: string;
3-
key: string;
3+
key?: string;
44
};
55

66
export type Callback = (error?: Error | null) => void;

packages/default-storage/tsconfig.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
"compilerOptions": {
44
"noEmit": true,
55
"types": [
6-
"node",
7-
"mocha",
86
"@wdio/globals/types",
97
"@wdio/mocha-framework",
10-
"expect-webdriverio"
8+
"expect-webdriverio",
9+
"mocha",
10+
"node"
1111
]
1212
},
13-
"include": ["example/**/*.ts", "example/**/*.tsx"]
13+
"include": ["example/**/*.ts", "example/**/*.tsx", "src"]
1414
}

yarn.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4159,6 +4159,7 @@ __metadata:
41594159
"@types/jest": 29.5.4
41604160
eslint: ^8.54.0
41614161
jest: 29.5.0
4162+
prettier: ^2.8.8
41624163
react-native-builder-bob: 0.20.0
41634164
ts-jest: 29.1.1
41644165
typescript: ^5.3.0

0 commit comments

Comments
 (0)