Skip to content

Commit 8553b18

Browse files
committed
refactor: add noEmit to tsconfig.json
1 parent d6cb1ce commit 8553b18

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

packages/create-react-native-library/templates/common/$package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"example": "yarn workspace <%- project.slug -%>-example",
3737
<% } -%>
3838
"test": "jest",
39-
"typecheck": "tsc --noEmit",
39+
"typecheck": "tsc",
4040
"lint": "eslint \"**/*.{js,ts,tsx}\"",
4141
<% if (example !== 'expo') { -%>
4242
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",

packages/create-react-native-library/templates/common/lefthook.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pre-commit:
66
run: npx eslint {staged_files}
77
types:
88
glob: "*.{js,ts, jsx, tsx}"
9-
run: npx tsc --noEmit
9+
run: npx tsc
1010
commit-msg:
1111
parallel: true
1212
commands:

packages/create-react-native-library/templates/common/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"lib": ["ESNext"],
1313
"module": "ESNext",
1414
"moduleResolution": "Bundler",
15+
"noEmit": true,
1516
"noFallthroughCasesInSwitch": true,
1617
"noImplicitReturns": true,
1718
"noImplicitUseStrict": false,

packages/react-native-builder-bob/src/targets/typescript.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,6 @@ export default async function build({
3838
if (config.compilerOptions) {
3939
const conflicts: string[] = [];
4040

41-
if (config.compilerOptions.noEmit !== undefined) {
42-
conflicts.push('compilerOptions.noEmit');
43-
}
44-
45-
if (config.compilerOptions.emitDeclarationOnly !== undefined) {
46-
conflicts.push('compilerOptions.emitDeclarationOnly');
47-
}
48-
4941
if (config.compilerOptions.declarationDir) {
5042
conflicts.push('compilerOptions.declarationDir');
5143
}
@@ -170,6 +162,8 @@ export default async function build({
170162
'--pretty',
171163
'--declaration',
172164
'--declarationMap',
165+
'--noEmit',
166+
'false',
173167
'--emitDeclarationOnly',
174168
'--project',
175169
project,

0 commit comments

Comments
 (0)