craigtaub / our-own-prettier

Our own version of Prettier in <20 lines

Home Page:https://craigtaub.dev/under-the-hood-of-vscode-auto-formatters

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

our-own-prettier

A simple VSCode extension which auto-formats 1 scenario.

How to run the extension

  1. Checkout + install code
  2. F5 (launch client in debug mode)
  3. Open files/test.js + highlight code
  4. Open "Command Palette"
  5. Click "Sexify it"

Scenarios

Scenario 1

Before

myFunction();

After

myFunction();

Scenario 2

Before

myFunction(one, two, three);

After

myFunction(
  one,
  two,
  three
);

About

Our own version of Prettier in <20 lines

https://craigtaub.dev/under-the-hood-of-vscode-auto-formatters


Languages

Language:JavaScript 100.0%