This question is a duplicate of Create tasks in Visual Studio Code per user but I cannot mark it as such as that has not been upvoted or accepted yet. Reproduced here:
It looks like this will be in v1.42, the January 2020 release. See https://github.com/microsoft/vscode/issues/89343 (user level tasks). And https://github.com/microsoft/vscode/issues/1435.
In addition to having tasks in your .code-workspace file and in
tasks.json in your open folder, you can now have tasks in a user level
tasks.json next to your user settings.json.
Open a folder that has some tasks. The vscode project is a good
example.
Run the Open User Tasks command to create a tasks.json file next to
your user settings.json file.
Add a shell or process type task to the new tasks.json. Only those two
types of task are supported here.
Run the Run Task command and verify that you see your new user level
task. Verify that you can tell that it's a user level task in the task
quick pick. Verify that you can configure your user level task by
clicking the gear next to it in the quick pick. Verify that you can
run the user task.
It is in the Insiders' Build already so presumably v1.42.
------- From the 1.42 release notes:
User level tasks
Tasks declared in tasks.json
are now supported at the User Settings
level. If you have a build script that you use across many projects,
or if you don't want your tasks in a project folder, you can add your
tasks in the user tasks.json
file. You can run the Tasks: Open User
Tasks command to create user level tasks. These tasks will be
available across all folders and workspaces. Only the shell
and
process
task types are supported here.