Skip to content

chore: Add separate tsconfig for metro-config#6487

Merged
tjzel merged 1 commit intomainfrom
@tjzel/metro-config/add-separate-tsconfig
Sep 6, 2024
Merged

chore: Add separate tsconfig for metro-config#6487
tjzel merged 1 commit intomainfrom
@tjzel/metro-config/add-separate-tsconfig

Conversation

@tjzel
Copy link
Collaborator

@tjzel tjzel commented Sep 5, 2024

Summary

Including both src and metro-config in tsconfig.json of Reanimated package sometimes falsely suggests TypeScript that there should be lib/module/src and lib/module/metro-config directories.

Test plan

🚀

Copy link
Member

@MatiPl01 MatiPl01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't say that it suggests that there should be a separate directory in the built library as the react-native-builder-bob field in the package.json specifies which directories should be included in the build process.

To me, adding metro-config directory to the include array in the tsconfig just says that the same typescript configuration should be used for this directory as for the src.

It makes no difference to me which approach we decide to use, so if you prefer this implementation, let's merge this PR.

@tjzel tjzel added this pull request to the merge queue Sep 6, 2024
Merged via the queue into main with commit 4a5e23a Sep 6, 2024
@tjzel tjzel deleted the @tjzel/metro-config/add-separate-tsconfig branch September 6, 2024 17:48
github-merge-queue bot pushed a commit that referenced this pull request Sep 8, 2024
## Summary

Currently .js files weren't type checked. This PR adds type-checking for
them alongside with necessary JSDoc comments.

Requires:
- #6486
- #6487
- #6485

## Test plan

🚀
r0h0gg6 pushed a commit to r0h0gg6/react-native-reanimated that referenced this pull request Jul 28, 2025
## Summary

Including both `src` and `metro-config` in `tsconfig.json` of Reanimated
package sometimes falsely suggests TypeScript that there should be
`lib/module/src` and `lib/module/metro-config` directories.

## Test plan

🚀
r0h0gg6 pushed a commit to r0h0gg6/react-native-reanimated that referenced this pull request Jul 28, 2025
## Summary

Currently .js files weren't type checked. This PR adds type-checking for
them alongside with necessary JSDoc comments.

Requires:
- software-mansion#6486
- software-mansion#6487
- software-mansion#6485

## Test plan

🚀
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants