-
-
Notifications
You must be signed in to change notification settings - Fork 632
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
chore: fix ide complaints #2122
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 38a6702:
|
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.
Thanks for the suggestion.
We should do the same in zustand and valtio too.
Meanwhile, please see these minor comments.
@@ -11,6 +11,7 @@ | |||
"exactOptionalPropertyTypes": true, | |||
"baseUrl": ".", | |||
"skipLibCheck": true, | |||
"noEmit": true, |
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.
Do we need this even if we have --noEmit
option?
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.
not anymore
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.
sorry i misunderstood, yes we need it because allowImportingTsExtensions
is only allowed when --noEmit or --emitDeclarationOnly is enabled, since these import paths would not be resolvable at runtime in JavaScript output files.
https://www.typescriptlang.org/tsconfig#allowImportingTsExtensions
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.
We used to have --noEmit
in package.json and no "noEmit" in tsconfig.json. Does it cause any errors with this PR's change?
I mean I'm aware of https://www.typescriptlang.org/tsconfig#allowImportingTsExtensions and it's working before this PR, so I'm confused.
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.
it'ok, we are bundling with rollup instead of tsc.
if you remove the --noEmit
option in the pretest script, you will be able to see the complaint in the console.
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.
Yeah, I know. I'm fine with having "noEmit" in tsconfig.json, but in that case remove --noEmit
from pretest script to avoid duplication. But, if --noEmit
works without adding "noEmit" in tsconfig.json, it keep the original idea, so it seems better.
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.
VSCode(tsserver) will show an error in the tsconfig.json
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.
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.
Alright! thanks for the clarification!
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.
The change looks good.
Can you also open the same PR in the two repos? https://github.com/pmndrs/zustand and https://github.com/pmndrs/valtio
there is a flaky test case :( |
Yeah... Maybe using user-event would help. |
Hmm, Feel free to dig into it! |
Related Issues or Discussions
Summary
Check List
yarn run prettier
for formatting code and docs