-
-
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
[import/no-duplicates] (prefer-inline) Does not detect across type and regular imports #2834
Comments
This works locally: #2835 |
This took me by surprise too. The docs say:
I find it hard to read this in any way other than how @benkrejci also interpreted it. Earlier in the same document a duplicate is defined as "have to point to the same module on the filesystem". Surely a 2-line import as posted above should classify as a "duplicate import" using this definition? If I'm also reading this incorrectly, an edit to the documentation to clarify would be greatly appreciated. Thanks! |
I definitely agree that when |
Since there seems to be some agreement here, I added tests and an example to the doc: #2835 |
@ljharb hey any idea when the next release will be? (Or maybe we could get an |
I don't do prereleases, and I don't have planned release dates, but I am hoping to get one done soon. |
I misread the no-duplicates doc to mean that when using the "prefer-inline" option, the following would be detected as an error:
And would fix to:
I realize now that this is not what is stated in the doc, but I still want this behavior. It is possible to implement, and from my perspective is probably what those using
prefer-inline
actually want. But if not, perhaps could be implemented with a new option, e.g.prefer-combined-type-imports
The text was updated successfully, but these errors were encountered: