vuedx/languagetools

Moving a vue file creates an Include entry in tsconfig.json - why?

gregveres opened this issue · 1 comments

Describe the bug
when I move a .vue file from one directory in my source tree to another directory in the source tree, VueDX modifies my tsconfig.json file by putting an entry in the 'include' section that points to the file in the new location.

Why does it do this and is there a way to make it stop? This is incredibly annoying because it clutters up the tsconfig.json file if I miss the fact that it changed and don't revert it. It is also incredibly annoying because every time I move files, I have to find the tsconfig.json file and either not save the open buffer or revert the file - both are annoying operations involving a popup dialog.

To Reproduce
Steps to reproduce the behavior:
take any project based on typescript using vue.
Move a .vue file from one directory to another directory where both are under /src
What you will see is that tsconfig.json gets modified as above

Expected behavior
tsconfig.json shouldn't be touched. There is no value in the change that was made to the file.

Info (please complete the following information):

  • OS windows 10
  • IDE VS Code
  • TypeScript Version 4.3.2
  • Vue Version 2.6.13
  • Other versions (e.g. Nuxt, Vue Router etc.)
znck commented

This is a side effect from monkey patching tsserver APIs.

I am working on an alternate much cleaner implementation (#240) which would not have such issues.