Support for reading bundler's config
All major bundlers have a resolve configuration, for example:
- https://vite.dev/config/shared-options.html#resolve-alias
- https://webpack.js.org/configuration/resolve/#resolve
- https://rspack.dev/config/resolve
We can read users' config file and get the normalized resolve config to align ESLint's module resolution with the bundler’s behavior.
Some features implemented in eslint-import-resolver-oxc:
- auto-detect bundler configs
- export a function to transform the config
If anyone has more ideas, please feel free to discuss, and I'd be happy to port this feature to this repository.
cc @SukkaW @Shinigami92
IMHO, we do have eslint-import-resolver-vite, eslint-import-resolver-webpack. I don't see any typescript specific feature that we should implemented in this resolver anyway.
IMHO, we do have
eslint-import-resolver-vite,eslint-import-resolver-webpack. I don't see any typescript specific feature that we should implemented in this resolver anyway.
Those resolvers doesn't support .ts configs AFAIK.
Edit: jiti is already integrated into ESLint, so this should not be considered. (Although I don't like jiti personally due to babel is bundled in it)
eslint-import-resolver-webpack is very outdated.
Maybe we should support them in eslint-plugin-import-x instead, but in this resolver, it could also benefit eslint-plugin-import users.
Those resolvers doesn't support
.tsconfigs AFAIK.
TBH, it is their job to publish type declarations, not a reason for us to reinvent their wheels.
And we do have a compact util for adding legacy resolvers to eslint-plugin-import-x, we are already benefiting those users.
TBH, it is their job to publish type declarations, not a reason for us to reinvent their wheels.
@SukkaW I'm talking about vite.config.ts/webpack.config.ts for example, not related to declaration files at all.
More discussion at https://github.com/9romise/eslint-import-resolver-oxc/issues/83