-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
import/no-unresolved
on NX monorepos starting from version 3.8.x
#376
Comments
Can you helps to try next major version? Although there are some special edge cases failing, but I think most things would just work as expected. |
@JounQin, how can I test it? I don't see a pre-release package on NPM. |
@estiller Did you see the codesandbox ci comment? https://ci.codesandbox.io/status/import-js/eslint-import-resolver-typescript/pr/368/builds/596603 |
@JounQin, no, I missed it. 😄 Anyway, it seems to work ok with this version:
|
@estiller Great to hear, did you notice any performance improvement? |
I just tried it on the "real" project, and on my local machine, it got the total lint time from ~15 seconds to ~13 seconds, which is a sizeable improvement given that we have other plugins we use as well. |
same issue here, after downgrading to |
I know the problem, etc... |
We have a subtle issue: --- a/eslint.config.mjs
+++ b/eslint.config.mjs
@@ -62,7 +62,7 @@ export default [
],
},
settings: {
- 'import/resolver': { typescript: { project: './tsconfig.base.json' } },
+ 'import/resolver': { typescript: { project: './tsconfig.lib.json' } },
},
},
]; The paths are mapped correctly in PR #368 because it adds support for project references, so all linked/referenced `tsconfig.json are detected and mapped.
In PR #372, we added the ability to search for a path across all mappers if the current file is unknown. Therefore, even though the files are empty, we still need to add the mapper. The latter not only adds a minifx for #372, but it also allows your repro to work correctly (even if it's incorrect... amazing luck!) |
I can confirm that version |
Hi,
Starting from version
3.8.x
ofeslint-import-resolver-typescript
, I started gettingimport/no-unresolved
on references between projects in my NX monorepo with aliases.It worked fine until version
3.7.0
, but it stopped working since. I also tested it on the recently released3.8.6
but it's still the same issue.There are some related issues starting from
3.8.x
, but this issue wasn't resolved as part of the fixes:eslint-import-resolver-typescript
from 3.7.0 to 3.8.3 #364no-unresolved
JS alias regression in 3.8+ #363I created a reproduction repo here. It has two libraries, with
my-lib2
referencingmy-lib
.Reproduction steps:
pnpm install
. This will install version3.7.0
.pnpm lint
. Everything should work fine.pnpm add -D [email protected]
.pnpm lint
and you will get a lint error.I'd appreciate any help. Thanks!
The text was updated successfully, but these errors were encountered: