Hide JavaScript Files in Visual Studio Code

The Visual Studio Code team are definitely listening to their users. Just a few weeks back, a request went in asking for the ability to hide files – like the JavaScript files in a TypeScript project. Having become accustomed to this in Visual Studio Pro, I up-voted this suggestion. It is already available.

To hide any files (not just JavaScript files) you add the following to your settings.json file.

{
    "files.exclude": {
        "**/*.js": true
    }
}

If you hit File -> Preferences -> Workspace Settings it will open this file for you (and create it if it doesn’t yet exist).

You can adjust the rule to hide anything you like and you can add as man exclusions as you like.