Skip to content

Support for reading bundler's config #445

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

Open
9romise opened this issue Apr 27, 2025 · 3 comments
Open

Support for reading bundler's config #445

9romise opened this issue Apr 27, 2025 · 3 comments

Comments

@9romise
Copy link
Collaborator

9romise commented Apr 27, 2025

All major bundlers have a resolve configuration, for example:

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.

@JounQin
Copy link
Collaborator

JounQin commented Apr 27, 2025

cc @SukkaW @Shinigami92

@SukkaW
Copy link
Collaborator

SukkaW commented Apr 27, 2025

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.

@JounQin
Copy link
Collaborator

JounQin commented Apr 27, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants