Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(common): export base tsconfig #2873

Merged
merged 3 commits into from
May 30, 2024
Merged

Conversation

ssalbdivad
Copy link
Collaborator

This migrates tsconfig.base.json to @latticexyz/common so it can be referenced in templates, and updated overtime without creating breaking changes.

Copy link

changeset-bot bot commented May 24, 2024

⚠️ No Changeset found

Latest commit: 350cfae

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes changesets to release 23 packages
Name Type
@latticexyz/abi-ts Patch
@latticexyz/block-logs-stream Patch
@latticexyz/cli Patch
@latticexyz/common Patch
@latticexyz/config Patch
@latticexyz/dev-tools Patch
@latticexyz/faucet Patch
@latticexyz/gas-report Patch
@latticexyz/protocol-parser Patch
@latticexyz/query Patch
@latticexyz/react Patch
@latticexyz/recs Patch
@latticexyz/schema-type Patch
@latticexyz/store-indexer Patch
@latticexyz/store-sync Patch
@latticexyz/store Patch
@latticexyz/utils Patch
@latticexyz/world-modules Patch
@latticexyz/world Patch
create-mud Patch
solhint-config-mud Patch
solhint-plugin-mud Patch
mock-game-contracts Patch

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

"./tsconfig.paths.json"
]
"extends": ["./packages/common/tsconfig.base.json", "./tsconfig.paths.json"],
"exclude": ["**/dist", "**/node_modules", "**/docs", "**/e2e"]
Copy link
Member

Choose a reason for hiding this comment

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

can you share a bit about these exclusions? specifically docs and e2e and wondering about the impacts (e2e tsconfigs extend this one and unclear how that impacts exclude here)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was migrated directly from the previous tsconfig.base.json.

The intent I suppose is to avoid prematurely pulling those projects in in-editor, but we could take a closer look in a future commit if you'd like.

Copy link
Member

@holic holic May 28, 2024

Choose a reason for hiding this comment

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

That makes sense for most other packages, but if I were working in e2e dir and that tsconfig inherits from this base, where e2e is ignored, does that mean we don't get IDE typechecking in e2e?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, worst case scenario it could mean typechecking would use TS's default options, which would still kind of suck admittedly especially strictNullChecks not being on.

That said, as far as I can tell at least in the directories that have nested tsconfigs in those areas, the settings are applied, even if they don't override excludes.

image

I suppose this is because relative to the declared tsconfig.json dir, the e2e path segment doesn't occur.

However, it would be worthwhile to go through and ensure packages like e2e/packages/test-data do declare their own tsconfig if they are excluded or avoid excluding them altogether.

I could add that to this PR if you'd like but I do want to reiterate that this was not a change I made in this PR.

Copy link
Member

Choose a reason for hiding this comment

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

I could add that to this PR if you'd like but I do want to reiterate that this was not a change I made in this PR.

Totally, I think it was added as part of #2828 ? I just missed the potential implications in that PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Cool, just let me know whether you'd like to address that here or tackle it via a separate PR.

@holic holic changed the title feat(templates): reference an extensible tsconfig from @latticexyz/common feat(common): export base tsconfig May 28, 2024
@holic holic merged commit f3180fe into latticexyz:main May 30, 2024
11 of 12 checks passed
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.

2 participants