A custom resolver for eslint-plugin-import that resolves package exports and imports defined in the exports and imports fields of package.json. Version 1.0.1 is the only published version. It eliminates false positives for import/no-unresolved when using package.json exports and imports (e.g., #imports or subpath exports). Different from the default node resolver, which does not support these fields. Supports aliases and custom module directories. Works with both CJS and ESM configs, but requires eslint-plugin-import to be installed. No known alternative resolvers for this specific use case.
npm install eslint-plugin-import-exports-imports-resolverVerified import paths — ran on the pinned version, not inferred.
Configures the resolver in a .eslintrc.js file with an alias and custom module directories, enabling resolution of package imports and exports.
Use './node_modules/eslint-plugin-import-exports-imports-resolver/index.js' instead of the package name.
Use require() instead of import.
Install eslint-plugin-import and configure it with import/no-unresolved rule enabled.
Use explicit alias mappings, e.g., 'project-foo' -> 'project-foo-v1'.
Replace 'eslint-plugin-import-exports-imports-resolver' with './node_modules/eslint-plugin-import-exports-imports-resolver/index.js' in settings.import/resolver.
Run 'npm install eslint-plugin-import --save-dev'.
Add a settings object with 'import' key: settings: { 'import': { resolver: { ... } } }.Ensure your package.json has an 'imports' field mapping '#foo' to a valid path, e.g., { "imports": { "#foo": "./bar.js" } }.