-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Replacing the built-in default import resolver that supports exports
and imports
from package.json
#208
Comments
Note that the default resolver will try to match the Node.js resolving behavior, so no |
Why not use |
To be clear, i certainly don’t refuse to implement the feature; it’s that to do it properly takes more time than I’ve had yet (and can’t be done with only require.resolve/import.meta.resolve, because people frequently need to lint for node versions different from the one they’re running) |
Yes. The resolving happens inside the ESLint plugin, and the ESLint plugin needs to be synchronous. Besides |
eslint-plugin-import-x
haseslint-import-resolver-node
as a dependency. When no resolver is specified in the eslint config, theeslint-import-resolver-node
will be used. However,eslint-import-resolver-node
doesn't supportexports
andimports
frompackage.json
and @ljharbsimply refusesdoesn't have time to implement this feature and even locks the feature request issue, see import-js#1810.So our plan is to abandon the
eslint-import-resolver-node
. We will be building a new eslint import resolver upon@dual-bundle/import-meta-resolve
enhanced-resolve
. We will ship it witheslint-plugin-import-x
and it will be an interface v3-only resolver.In the next major version of
eslint-plugin-import-x
, we will removeeslint-import-resolver-node
in favor of our own default resolver.The text was updated successfully, but these errors were encountered: