import-js / eslint-import-resolver-typescript

This plugin adds `TypeScript` support to `eslint-plugin-import`
https://www.npmjs.com/package/eslint-import-resolver-typescript
ISC License
698 stars 61 forks source link

Cannot use with `eslint-plugin-i` #253

Closed csantos1113 closed 7 months ago

csantos1113 commented 7 months ago

I always want "faster speed" and was hyped when I saw this in your README.md

This plugin adds TypeScript support to eslint-plugin-import (Or maybe you want to try eslint-plugin-i for faster speed)

But I was pulled down of my excitement because there is a required peerDependency for eslint-plugin-import that doesn't let me swap 😞

https://github.com/import-js/eslint-import-resolver-typescript/blob/340054d3afb8b31f5ade6192095b644e9c299fcb/package.json#L66

Would it be possible to make these 2 optional peerDependencies instead? 🙏

JounQin commented 7 months ago

It's clearly documented that you should use alias on installation.

npm install -D eslint-plugin-import@npm:eslint-plugin-i@latest

See also #248

jrnail23 commented 1 month ago

FYI, that clearly documented fix is incorrectly documented:

https://github.com/import-js/eslint-import-resolver-typescript/blob/master/README.md?plain=1#L61

Important when using eslint-plugin-i and npm: Use npm i -D eslint-plugin-import@eslint-plugin-i@latest eslint-import-resolver-typescript, or you will end up with both eslint-plugin-import and eslint-plugin-i in your node_modules.