-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Handle TSExportAssignment exports other than namespaces #1527
Comments
I believe there is a related issue here with React Navigation import errors, see the issue opened here: eslint/eslint#12761. A work around is to ignore the imports for the react navigation, but this is not desirable long term. Any suggestions? Thanks. |
Facing the exact same issue... Help is highly appreciated! :) |
@maribies @PatricSachse your issue seems to have been resolved in |
@joaovieira - just tried bumping to 4.1.1 and am having the same errors. i'm having my team review in case i missed something and @PatricSachse - if you bump and it resolves please let us know! |
@maribies would you mind continuing this conversation in that issue? thanks |
At the moment
eslint-plugin-import
only handles theexport =
syntax in TypeScript if it references a namespace.Using
@types/supertest
as an example. The module definition is:And the generated
ExportMap
is:Only the namespace is being exported. The declared function with the same name is not added to the exported namespace as 'default'.
Looking at the code, it is explicitly only handling namespaces.
This means, user code such as:
Raises an eslint error
No default export found in module.eslint(import/default)
.The same issue happens when the module re-exports an identifier as in
@types/lodash
. The module definition is:The ExportMap in this case is an empty object:
So, this fails:
Both are very common patterns in DefinitelyTyped.
The text was updated successfully, but these errors were encountered: