-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
imports-as-dependencies
: package with exports
instead of types
#1114
Comments
I've filed lukeed/resolve.exports#30 so we can hopefully reuse that package's mechanism for navigating |
@regseb : If you care to fork the project, I'd be happy to use it. Doesn't look like it is going to be maintained at this rate. |
I think the import { resolveImport } from 'resolve-import'
// packages resolved according to their exports, main, etc.
// eg: URL(file:///path/node_modules/pkg/dist/mjs/index.js)
console.log(await resolveImport('pkg', '/path/to/y.js')) But like
An issue would have to be opened? |
Sounds like it, yes... |
Expected behavior
imports-as-dependencies
supports types defined in theexports
property.Actual behavior
imports-as-dependencies
reports: import points to package which is not found in dependencies. Because the rule only looks at thetypes
andtypings
properties.importsAsDependencies.js#L85
Files
package.json
index.js
Environment
eslint-plugin-jsdoc
version: 46.2.4Additional info
There's a similar problem with ESLint rules checking imports, as they only look at the
main
property:no-missing-imports
does not support "exports" in package.json mysticatea/eslint-plugin-node#255no-unresolved
is not aware ofexports
definition inpackage.json
import-js/eslint-plugin-import#1810import/no-unresolved
raise false positive when there is nomain
field in thepackage.json
import-js/eslint-plugin-import#2132The text was updated successfully, but these errors were encountered: