Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How does my vscode plug-in call remove all unused code #2188

Closed
yangdan8 opened this issue Dec 9, 2022 · 1 comment
Closed

How does my vscode plug-in call remove all unused code #2188

yangdan8 opened this issue Dec 9, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@yangdan8
Copy link

yangdan8 commented Dec 9, 2022

Because I want users to remove useless code when saving, which cannot be done through configuration, I wrote a vscode plug-in, but my vscode plug-in does not know how to call remove all unused code.

@johnsoncodehk
Copy link
Member

johnsoncodehk commented Jan 6, 2023

codeActionsOnSave not working before due to a bug, you can auto remove unused code on save in next version by add the following setting to .vscode/settings.json.

{
	"editor.codeActionsOnSave": {
		"source.removeUnused.ts": true
	}
}

@johnsoncodehk johnsoncodehk added the bug Something isn't working label Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants