Hide .js.map files in Visual Studio Code

In your settings (either user or workspace) there is a setting that you can tweak to hide anything you'd like:

{
    "files.exclude": {
        "**/.git": true,
        "**/.DS_Store": true
    }
}

So you can add in the following to hide .js and .js.map files

"**/*.js": true,
"**/*.js.map": true

As this other answer explains, most people probably only want to hide .js files when there is a matching .ts file.

So instead of doing:

"**/*.js": true

you might want to do:

"**/*.js": {"when": "$(basename).ts"}

I found this, If you have standard JS files then these will be hidden too which may not always be what you want. Perhaps this is better as it only hides JS files that match TS files...

{
    "files.exclude": {
        "**/.git": true,
        "**/.DS_Store": true,
        "**/*.js.map": true,
        "**/*.js": {"when": "$(basename).ts"}
    }
}

I really don't know how this is implemented but for hiding .js files works:

"**/*.js": {"when": "$(basename).ts"}

For hiding .js.map files works:

"**/*.js.map": {"when": "$(basename)"}