language-tools
language-tools copied to clipboard
`typescript.removeUnusedImports` does not work when using `defineModel()`
Vue - Official extension or vue-tsc version
3.2.2
VSCode version
1.107.1
Vue version
3.5.24
TypeScript version
5.9.3
System Info
System:
OS: Windows 11 10.0.22631
CPU: (12) x64 13th Gen Intel(R) Core(TM) i5-1345U
Memory: 2.18 GB / 15.66 GB
Binaries:
Node: 22.21.1
Yarn: 4.11.0
npm: 10.9.4
package.json dependencies
Steps to reproduce
- Have a SFC file that uses
<script setup>and thedefineModel()macro. - Run the command
TypeScript: remove unused importsin VS Code
What is expected?
It should remove unused imports
What is actually happening?
Nothing happens
Link to minimal reproduction
No response
Any additional comments?
Support for removing unused imports added in https://github.com/vuejs/language-tools/pull/5444
Cannot reproduce, please provide a minimal reproduction.
I have realised this actually only happens if you use defineModel(), I've updated the OP