Skip to content

Commit

Permalink
refactor: add noEmit to tsconfig.json
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Jul 26, 2024
1 parent d6cb1ce commit 8553b18
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"example": "yarn workspace <%- project.slug -%>-example",
<% } -%>
"test": "jest",
"typecheck": "tsc --noEmit",
"typecheck": "tsc",
"lint": "eslint \"**/*.{js,ts,tsx}\"",
<% if (example !== 'expo') { -%>
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pre-commit:
run: npx eslint {staged_files}
types:
glob: "*.{js,ts, jsx, tsx}"
run: npx tsc --noEmit
run: npx tsc
commit-msg:
parallel: true
commands:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"lib": ["ESNext"],
"module": "ESNext",
"moduleResolution": "Bundler",
"noEmit": true,
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": true,
"noImplicitUseStrict": false,
Expand Down
10 changes: 2 additions & 8 deletions packages/react-native-builder-bob/src/targets/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,6 @@ export default async function build({
if (config.compilerOptions) {
const conflicts: string[] = [];

if (config.compilerOptions.noEmit !== undefined) {
conflicts.push('compilerOptions.noEmit');
}

if (config.compilerOptions.emitDeclarationOnly !== undefined) {
conflicts.push('compilerOptions.emitDeclarationOnly');
}

if (config.compilerOptions.declarationDir) {
conflicts.push('compilerOptions.declarationDir');
}
Expand Down Expand Up @@ -170,6 +162,8 @@ export default async function build({
'--pretty',
'--declaration',
'--declarationMap',
'--noEmit',
'false',
'--emitDeclarationOnly',
'--project',
project,
Expand Down

0 comments on commit 8553b18

Please sign in to comment.