Visual Code 不断更改 tsconfig.json 中包含的文件
Visual Code constantly changes included files in tsconfig.json
从几个版本开始,当我在我的项目中添加或重命名文件时,Visual Code 不断地通过将单个文件添加到 include 数组来搞乱我的 tsconfig.json。
是否有任何设置告诉 VC 不要这样做?
TypeScript
扩展有一个在文件移动时更新导入的设置,这可能是罪魁祸首。
Typescript › Update Imports On File Move: Enabled
Enable/disable automatic updating of import paths when you rename or move a file in VS Code. Requires using TypeScript 2.9 or newer in the workspace.
将 typescript.updateImportsOnFileMove.enabled
设置为 never
将阻止它向 include
添加文件。如果您想被询问,您也可以将其设置为 prompt
。
从几个版本开始,当我在我的项目中添加或重命名文件时,Visual Code 不断地通过将单个文件添加到 include 数组来搞乱我的 tsconfig.json。
是否有任何设置告诉 VC 不要这样做?
TypeScript
扩展有一个在文件移动时更新导入的设置,这可能是罪魁祸首。
Typescript › Update Imports On File Move: Enabled
Enable/disable automatic updating of import paths when you rename or move a file in VS Code. Requires using TypeScript 2.9 or newer in the workspace.
将 typescript.updateImportsOnFileMove.enabled
设置为 never
将阻止它向 include
添加文件。如果您想被询问,您也可以将其设置为 prompt
。