[import/no-duplicates] False positive on multiple imports from submodules
See original GitHub issueI am seeing the following warning twice for .../node_modules/firebase/empty-import.d.ts' imported multiple times import/no-duplicates
for the following code:
import firebase from 'firebase/app';
import 'firebase/auth';
import 'firebase/database';
Interesting I am no seeing this warning if its simply
import firebase from 'firebase/app';
import 'firebase/database';
Additionally I saw this PR https://github.com/benmosher/eslint-plugin-import/pull/1612 where a comment is made about circling back on the second case. The fact that the second case isn’t triggering a warning makes me think that maybe this is just a bug handling 3 and not 2 🤷♂️ .
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
feature request: add ignore options for `import/no-duplicates`
This seems like an inherent flaw in resolving a module to a d.ts file that might represent multiple files. I don't think forcing...
Read more >Avoiding pylint complaints when importing Python packages ...
The false-positive imports can be nested in an enable-disable block without losing any coverage elsewhere: import sys sys.path.insert(0, '.
Read more >"Unused import" warning for module ... - YouTrack - JetBrains
PY-23573 False positive: unused import warning for multiple imports from one ... When importing multiple submodules and referencing the full namespace, ...
Read more >5. The import system — Python 3.11.1 documentation
The import statement combines two operations; it searches for the named module, then it binds the results of that search to a name...
Read more >no-duplicate-imports | typescript-eslint
no-duplicate-imports. Disallow duplicate imports. Deprecated. This rule has been deprecated in favour of the import/no-duplicates rule.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@the-ult here, which is why there’s a help wanted label.
@murilocp you’re correct, those are two different specifiers/modules and should not be warned on.