ESLint import resolver for ESM modules via package.json exports map.
Relies on NPM package resolve.exports
https://github.com/lukeed/resolve.exports
See:
- import-js/eslint-plugin-import#1868
- import-js/eslint-plugin-import#1810
- browserify/resolve#224
- wooorm/import-meta-resolve#2
- eslint-community/eslint-plugin-n#4
- mysticatea/eslint-plugin-node#255
- mysticatea/eslint-plugin-node#244
- mysticatea/eslint-plugin-node#258
- https://github.com/webpack/enhanced-resolve
Ran into an issue where this resolver would crash other eslint rules because it was trying to resolve builtin modules incorrectly.
Specifically this error, for
import/no-cycle
:Fixed it with the following snippet: