/our-own-prettier

Our own version of Prettier in <20 lines

Primary LanguageJavaScript

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
);