import/no-unresolved raises false positives in many projects
See original GitHub issueI think import/no-unresolved
isn’t the kind of rule that belongs in a linting config, because it makes a lot of assumptions about how modules are resolved, leading to false positives in many common cases. For example in Webpack, the use of aliases or non-traditional but registered extensions such as .vue
will raise a linting error when Webpack actually has no problems resolving these files.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6
Top Results From Across the Web
pylint false positive E0401 import errors in vscode while using ...
vscode was trying to use the globally installed pylint which simply was not aware of dependencies I installed in my Python venv. This...
Read more >rollup.js
If false is returned for moduleSideEffects and no other module imports anything from this module, then this module will not be included in...
Read more >found several packages and main redeclared as the imported ...
False -positives: found several packages and main redeclared as the imported package name ... GO-12784 Upgrade to v1.18 raises errors in "net/http" import....
Read more >Using kapt | Kotlin Documentation
If your project contains Java classes, kapt will also take care of them. ... in order to avoid false-positive cache hits for the...
Read more >Statistical significance for genomewide studies - PNAS
The false positive rate and FDR are often mistakenly equated, ... to identify many truly alternative features without including too many false positives....
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 FreeTop 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
Top GitHub Comments
There’s a webpack resolver for eslint-plugin-import that handles things like extensions and aliases.
Hmm… this plugin is definitely the only other tool that I’ve had to configure - even on large projects with very demanding build processes. So it does seem strange to have to duplicate that config, especially because it comes with no advantages I can see. Webpack and other build tools already provide very helpful module resolution errors (on save with a dev server) and never trigger false positives. 😕
As someone who maintains a project generator for thousands of other developers, this is the only Airbnb rule I’ve had to disable completely - and it was in direct response to people opening issues about the confusing errors they get from ESLint when using Webpack aliases.
It seems clear this is a
wontfix
though, so I’ll drop it.