You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the base Airbnb config with ESLint, I'm getting false positives for packages that definitely are installed and working from the import/no-unresolved rule:
3:18 error Unable to resolve path to module 'conf' import/no-unresolved
This seems to occur with packages whose package.json file has an exports field but no main field (of which sindresorhus/conf is an example).
As currently the rule does not work correctly with packages that only use an exports perhaps it should be turned off? Node has supported exports as an alternative to main as a package entry point for many years now, but until this is fixed upstream with eslint-plugin-import I think it might be best to avoid using it.
The text was updated successfully, but these errors were encountered:
Packages that fail to provide back compat with a main generally should be avoided, and since they’re in the extreme minority, you can put them in import/ignore for now. The rule remains incredibly valuable.
Using the base Airbnb config with ESLint, I'm getting false positives for packages that definitely are installed and working from the
import/no-unresolved
rule:This seems to occur with packages whose package.json file has an
exports
field but nomain
field (of which sindresorhus/conf is an example).import-js/eslint-plugin-import#1810 discusses support for this, but appears to be blocked by browserify/resolve#224.
As currently the rule does not work correctly with packages that only use an
exports
perhaps it should be turned off? Node has supportedexports
as an alternative tomain
as a package entry point for many years now, but until this is fixed upstream witheslint-plugin-import
I think it might be best to avoid using it.The text was updated successfully, but these errors were encountered: