vitonsky / eslint-plugin-paths

A plugin for ESLint, to force use paths aliases from tsconfig
https://www.npmjs.com/package/eslint-plugin-paths
Apache License 2.0
50 stars 0 forks source link

[ENHANCEMENT]: Support for package.json import aliases #71

Open AndreaPontrandolfo opened 4 months ago

AndreaPontrandolfo commented 4 months ago

It would be nice if this library supported package.json import specifiers too, instead of just Typescript aliases.

AndreaPontrandolfo commented 4 months ago

It should be pretty easy with package-up

vitonsky commented 4 months ago

Probably this use case may be resolved with issue https://github.com/vitonsky/eslint-plugin-paths/issues/34

User may manually import package.json file and provide aliases from there to a new option. This solution also cover any other imlementations of aliases

MrHBS commented 3 months ago

I would love to see this too

AndreaPontrandolfo commented 3 months ago

I tried to do this myself here, it's just an experiment, a naive implementation completely unusable in the real world. Maybe i will get back to it if i find the time. Also relevant: https://github.com/un-ts/eslint-plugin-import-x/issues/40