A Prettier JavaScript Formatter
Nice attempt, but currently wrong. For example, it pretty-formats this code:<p><pre><code>  function makeComponent() {
    return /*test*/ { a: 1
    };
  }
</code></pre>
into<p><pre><code>  function makeComponent() {
    return /*test*/
    { a: 1 };
  }
</code></pre>
From my own experience writing a formatter, comments are very difficult (if one wants to preserve them). I guess the author should reparse the generated code to ensure the AST hasn't changed.