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

Test: gray out unused variables in js and ts #50487

Closed
2 tasks done
mjbvz opened this issue May 25, 2018 · 0 comments
Closed
2 tasks done

Test: gray out unused variables in js and ts #50487

mjbvz opened this issue May 25, 2018 · 0 comments

Comments

@mjbvz
Copy link
Collaborator

mjbvz commented May 25, 2018

Test for #15710

Complexity: 2

Summary
We now gray out unused variables in parameters in javascript and typescript files, even if you have not configured the noUnusedLocals setting. This is controlled by the typescript.showUnused.enabled and javascript.showUnused.enabled settings.

The gray color is taken from the editorUnnecessary.foreground theme color

Testing
Clone or create a few basic js and ts projects, such as using create react app or the angular starers. Confirm that unused symbols are grayed out by default and have quick fixes associated with them

Things to try:

  • Make edits to the file and see if you can break where the gray out happens. The locations are based on markers so they aren't perfect but should be updated within around half a second if they get out of sync.

  • Try enabling and disabling the grey out using the typescript.showUnused.enabled and javascript.showUnused.enabled settings.

  • Try making unused variables errors by configuring a jsconfig/tsconfig with the noUnusedLocals and noUnusedParameters values. Unused variables should now have squigglies and be grayed out

  • Try configuring the fade out color with editorUnnecessary.foreground

@mjbvz mjbvz added this to the May 2018 milestone May 25, 2018
@chrmarti chrmarti assigned jrieken and unassigned rebornix May 29, 2018
@jrieken jrieken removed their assignment May 29, 2018
@gregvanl gregvanl removed their assignment May 29, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jul 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants