This is a plugin for Obsidian that introduces custom commands to format code.
Currently supports the following languages:
Prettier is used under the hood.

Until this plugin is not published in the Obsidian ecosystem you can install it using How to develop instructions
.obsidian/plugins/obsidian-format-codenpm inpm run dev