-
Notifications
You must be signed in to change notification settings - Fork 37.2k
Description
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.enabledandjavascript.showUnused.enabledsettings. -
Try making unused variables errors by configuring a
jsconfig/tsconfigwith thenoUnusedLocalsandnoUnusedParametersvalues. Unused variables should now have squigglies and be grayed out -
Try configuring the fade out color with
editorUnnecessary.foreground