You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.
Gah, this is going to go a bit into the drama side of FOSS. In case they see this, I want to preempt this comment by saying a huge thank you for all the work they've done in open source. It's thankless work but has provided oodles of value for the world. Everyone has a right to maintain their projects how they see fit and value different priorities in how software is developed/maintained. This is just coming a downstream dev affected by it all.
import/no-unresolved is only disabled for .ts and .tsx files, because Typescript handles this for us. Javascript files like eslint.config.mjs still have the rule enabled.
Unfortunately, the upstream eslint-plugin-import package this rule comes from has a longstanding bug in that it can't use exports from package.json, which causes monorepo plugins like typescript-eslint to become unresolvable. And the maintainer of that project is... controversial (see the hidden thread in the linked ticket). That same maintainer controls resolve, which is where the inability to read exports comes from.
Alternative projects like eslint-plugin-import-x exist, fixing that bug among others using enhanced-resolve... So you may suggest we (or Airbnb, really) just switch over like other projects have, but the same maintainer holds onto the upstream Airbnb configs and has... less than favorable views on forks of his projects. With those threads getting locked, there's pretty much no way to talk about it anymore and I, personally, have little desire to get involved.
So, long story short, what you can do:
Turn off the rule, or skip it on dependencies that use exports.
@iamturns I think it would be in the best interest of our users if we disabled these import rules from upstream and swapped them for one of these instead. We would still leave the rules disabled for .ts and .tsx by default, of course, but it would be nice for this project to be as plug-and-play as possible.
Shouldn't
import/no-unresolved
be off by default according to the docs? It seems to not be working as expected for my case.package.json
eslint.config.mjs
tsconfig.json
Terminal Output:
.../typescript-eslint-airbnb-compat/eslint.config.mjs 2:22 error Unable to resolve path to module 'typescript-eslint' import/no-unresolved
The text was updated successfully, but these errors were encountered: