---
title: Hiding JavaScript Files in VS Code
description: Like most JavaScript developers I'm writing a lot of Typescript, here are the steps to hide the JavaScript files that are compiled during the development process in VS Code.
date: 2021-07-09
tags: vscode, javascript, typescript
source: https://brianchildress.co/blog/hide-javascript-files-vscode
---

# Hiding JavaScript Files in VS Code

Like a lot of JavaScript developers these days I'm writing mostly Typescript. If using VS Code as your IDE it can be helpful to hide or ignore the `.js` files that are generated. Here are the steps to hide the JavaScript files that are compiled during the development process in VS Code:

1. Open the Workspace Settings JSON File

`CMS + Shift + P` --> Preferences: Open Settings (JSON)

2. Add the following lines to the JSON file

```JSON
  "files.exclude": {
    // Hide all .js files when have a .ts file
    "**/*.js": {"when": "$(basename).ts"},
    "**/*.js.map": true,
    "node_modules/": true // optional
  }
```

3. Save _settings.json_
