Code completion and import in yarn workspaces suggests non installed dependency pathing

Context

I'm using yarn4 workspaces with the following file structure:

In file to-be-used-in-index-from-app-a.js I export a class I want to use in a/index.js:


Issue

When writing code in app b (independent of app a), I get autocompletions / suggestions from app a:

and when I press enter, it autoimports like:

Expected behavior

I don't get autocompletion in app b for things exported in app a to be used in app a.

I don't have

“dependencies”: {
  “@org/a”: “workspace:^”
}

in apps/b/packages.json.

Is there any way I can deactivate this behavior (cross workspace pollution) and make Webstorm recommend these only if I have the respective lib / app in package.json?

1

Do you have a sample repo you can share that reproduces the issue?

0

Thank you for sharing all the details. I've created a new ticket: WEB-76459. Please vote for it to get notified of any progress.

0

请先登录再写评论。