Skip to content

Commit 2f5ec9e

Browse files
committed
chore: add tsc check to CI
1 parent 166491d commit 2f5ec9e

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

.circleci/config.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ aliases:
4444
name: Lint
4545
command: yarn lint
4646

47+
- &tsc
48+
name: TypeScript type check
49+
command: yarn test:tsc
50+
4751
# -------------------------
4852
# DEFAULTS
4953
# -------------------------
@@ -100,6 +104,14 @@ jobs:
100104
at: ~/react-native-push-notification-ios
101105
- run: *eslint
102106

107+
tsc:
108+
<<: *js_defaults
109+
steps:
110+
- attach_workspace:
111+
at: ~/react-native-push-notification-ios
112+
- run: *tsc
113+
114+
103115
# -------------------------
104116
# WORK FLOWS
105117
# -------------------------
@@ -117,3 +129,6 @@ workflows:
117129
- lint:
118130
requires:
119131
- checkout-code
132+
- tsc:
133+
requires:
134+
- checkout-code

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"test": "yarn test:flow && yarn test:js",
1414
"test:flow": "flow check",
1515
"test:js": "echo 0",
16-
"lint": "eslint ."
16+
"lint": "eslint .",
17+
"test:tsc":"tsc --noEmit"
1718
},
1819
"keywords": [
1920
"react-native",

tsconfig.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"compilerOptions": {
3+
/* Basic Options */
4+
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
5+
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
6+
"noEmit": true,
7+
/* Strict Type-Checking Options */
8+
"strict": true, /* Enable all strict type-checking options. */
9+
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
10+
}
11+
}

0 commit comments

Comments
 (0)