-
-
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
Error for import type, Imported multiple times
in typescript
#2843
Comments
Impacting us quite a lot, reverted for the moment. |
@njfamirm given your example, passing code for this rule would be the following: import {
createServer,
type IncomingMessage,
type ServerResponse
} from 'node:http' (assuming the rule in question is |
there is an error with import type testSubject from '../properties'
import type { Properties } from '../properties' yields an |
- #342 - import-js/eslint-plugin-import#2843 Signed-off-by: Lexus Drumgold <[email protected]>
Yes we can make it pass by doing that but as type imports will not end up in the outputted JS, it would be good if we can actually differentiate (like the previous version did) between purely type imports and imports when it comes to |
Yes, you're right. |
|
- #387 - import-js/eslint-plugin-import#2843 Signed-off-by: Lexus Drumgold <[email protected]>
Will #2716 address this issue (among others)? I've also run into a similar situation in the following case with import type React from 'react';
import { useEffect } from 'react'; The import type React, { useEffect } from 'react'; This is both a typescript error and a
|
Yes, I believe #2716 will address that. |
ok, this is new rule, so we update our codes to remove this lint error. |
- import-js/eslint-plugin-import#2843 Signed-off-by: Lexus Drumgold <[email protected]>
- import-js/eslint-plugin-import#2843 Signed-off-by: Lexus Drumgold <[email protected]>
- import-js/eslint-plugin-import#2843 Signed-off-by: Lexus Drumgold <[email protected]>
Hello
On the
2.28.0
version of this package, I'm getting an error from eslint:Imported multiple times
.This happens when I use import type in addition to normal import!
For example:
``Ts
import {createServer} from 'node:http';
import type {IncomingMessage, ServerResponse} from 'node:http';
The text was updated successfully, but these errors were encountered: