-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Integrate "Are the Types Wrong", and fix issues #162
Comments
@arethetypeswrong/cli
@Mrtenz I ran into this tool when researching |
Interesting. Is there a difference between CJS and ESM type declarations? I think the fallback conditions will be resolved when we bump to TypeScript >=5. |
Node 10 support for the |
Just tested with TypeScript 5.3 and it still says "Used fallback condition". Not sure why that happens. |
Ah, I just remembered. The order of exports matters. If you move
|
Ah that's interesting! I realized I didn't answer this question:
I think so, yes. I think all imports in ESM type declarations need to end in |
Running |
Gave it a try here: #178. |
Are the Types Wrong? is a tool that scans a library and highlights potential issues with importing it via Node, CommonJS, and ESM.
Running this tool against
@metamask/utils
shows the following report:This tool comes with a CLI which we can run manually to see these issues. We can also add it as a lint step in CI to verify that we don't have any issues going forward.
Once we've update this library so that it passes the above checks, we can copy any changes which are necessary to the module template and apply them to every other library.
The text was updated successfully, but these errors were encountered: