sweepline / eslint-plugin-unused-imports

Package to separate no-unused-vars and no-unused-imports for eslint as well as providing an autofixer for the latter.
MIT License
504 stars 21 forks source link

While resolving: eslint-plugin-unused-imports@3.0.0 Found: @typescript-eslint/eslint-plugin@5.62.0 #57

Closed SamHuo213 closed 1 year ago

SamHuo213 commented 1 year ago

While installing

npm install eslint-plugin-unused-imports --save-dev

I get the following error

npm ERR! While resolving: eslint-plugin-unused-imports@3.0.0 npm ERR! Found: @typescript-eslint/eslint-plugin@5.62.0 npm ERR! node_modules/@typescript-eslint/eslint-plugin npm ERR! dev @typescript-eslint/eslint-plugin@"^5.59.11" from the root project

image

alpharder commented 1 year ago

Guys, pay attention to the readme:

Version 3.x.x is for eslint 8 with @typescript-eslint/eslint-plugin 6
Version 2.x.x is for eslint 8 with @typescript-eslint/eslint-plugin 5

You're both installing incorrect versions

kctang commented 1 year ago

My apologies for not rtfm carefully. Given my scenario, switching to v2.x.x works.