javascript.updateImportsOnFileMove.enabled will destroy your project in some cases #53754
Labels
*duplicate
Issue identified as a duplicate of another issue(s)
javascript
JavaScript support issues
typescript
Typescript support issues
upstream
Issue identified as 'upstream' component related (exists outside of VS Code)
When I was prompted if I always wanted to always automatically update the references if I moved a file, I thought nothing of it and clicked yes. Imagine my surprise when vscode opened up hundreds of files in my project and started inserting references to some files far outside of the project space. My cpu went into overdrive
Killing vscode didn't help. It started right up doing it when I restarted. Scary. In the end, manually editing the settings file ("javascript.updateImportsOnFileMove.enabled": "always => never") proved the way to turn it off.
Steps to Reproduce:
I don't know and I don't care. I will never use this function again.
As far as I can tell most, perhaps all, of the affected imports had an @ in them, e.g. "@lingui/react": "2.0.7"
This should never have happened. Vscode should not process every file in the project to check for file links and change them, only files you move (as advertised). Also it should imho never blindly start importing references outside of the project directory. That makes no sense to me.
My assumption is that it looked for the node_modules/package file up the tree for some reason, I assume because of the @ sign, but not sure.
The text was updated successfully, but these errors were encountered: