-
Notifications
You must be signed in to change notification settings - Fork 196
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
Conversation
|
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"] |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
This migrates
tsconfig.base.json
to@latticexyz/common
so it can be referenced in templates, and updated overtime without creating breaking changes.