Ever since Go was released with gofmt, I've been fascinated by the idea of pretty printing the entire codebase. For three reasons:
- On a technical level, what are the algorithms to be able to do that and produce reasonable code
- On an impact level, it's going to avoid wasting so many people's time. See this section of the README for the rationale: https://github.com/prettier/prettier#why-prettier
- On a people level, I wanted to see if I could get good at the convincing game
During the winter break, two people independently started working on a JS pretty printer: James Long on prettier and Pieter Vanderwerff using Reason and the flow infrastructure. I started being the cheerleader by setting them up with unit tests, sense of progress around how many nodes needed to be printed, telling them what looked bad when running through a real codebase so they could fix it...
They both made a lot of progress but unfortunately had to get back to their "real job" at the end the vacation, and I didn't want for yet another effort to die, so I worked on it full time!
As for everything meaningful, you've got to pitch what you want to your manager and the org so that you get support. The good thing is that a bunch of efforts to automatically format code as spinning up at Facebook for various languages (Python, Java, Hack...). So the vision is definitely starting to be shared across the company :)