vscode-esformatter

An esformatter support plugin, which helps JavaScript developers beautify/format the code

Usage no npm install needed!

<script type="module">
  import vscodeEsformatter from 'https://cdn.skypack.dev/vscode-esformatter';
</script>

README

vscode-esformatter

vscode version

Format JavaScript using esformatter

VS Code has built-in formatter, but it may lack of the customizability which required by your team urgently. This extension brings esformatter, and have it as the default formatting tools.

Install

Launch VS Code Quick Open (cmd/ctrl + p), paste the following command, and press enter.

ext install esformatter

Usage

I assume you are familiar with the configuration for esformatter.

vscode-esformatter will read configurations from following places in order:

  1. ${workspaceRoot}/.esformatter(strongly recommended)
  2. configurations directly set in package.json
  3. ~/.esformatter
  4. /.esformatter

Once you save updates to a JavaScript file, vscode-esformatter tries format code automatically for you.

Settings

{
    "editor.formatOnSave": false //whether to format code on save
}

Keybindings

The default format command shift+alt+f is overrided, so when you go with Format Code approach, vscode-esformatter take the job from built-in formatter.

LICENSE

MIT License