4 ms·
The amazing thing, for me, is: 1. Announced 2 months ago 2. Already adopted by, it seems, every major JS project. (https://twitter.com/jlongster/status/852532
by startupdiscuss 10y ago
The amazing thing, for me, is:
1. Announced 2 months ago
2. Already adopted by, it seems, every major JS project. (https://twitter.com/jlongster/status/852532847252566017 https://twitter.com/jlongster/status/852532847252566017)
3. 7000 stars, 100,000 npm downloads/mo
Now some people will say it is a better mousetrap, but even now I can't tell you what the difference is between it and all the other linters. I can tell you that, based on the popularity, I would just default to this one and assume all this famous projects and people have worked it out.
How did it get it so popular? What made people want to try it out? Just word of mouth?
- shriek 10y agoMost notable feature of prettier being able to format based on the wrap length. I don't know about others, but I definitely switched to it just for that feature.
- dguo 10y agoSpeaking for myself, I've been waiting for 1.0 before using it, but I've been very excited for this project since its announcement. I've personally experienced how much time can be wasted bikeshedding over stylistic issues. In most cases, just picking a consistent standard is far more important than whatever the choice happens to be. Prettier will make almost all that bikeshedding unnecessary. Even with ESLint having autofix capabilities, Prettier seems far more comprehensive in that regard. It also isn't doing exactly the same things as linters. They check for programming errors as well, not just stylistic issues. With those linters, you also need to decide how to configure the rules (though picking a preset can make that easier). I have always loved that Python has an "official" style guide (https://www.python.org/dev/peps/pep-0008/ https://www.python.org/dev/peps/pep-0008/), and gofmt (https://golang.org/cmd/gofmt/ https://golang.org/cmd/gofmt/) is one of the reasons I want to try out Go, so Prettier is a great development in my opinion. I am optimistic that the community will keep on adopting it, helping make our code more readable and allowing us to focus on actually building libraries, tools, applications, etc. rather than arguing over where we should and shouldn't have spaces in our code. Edit: my TL;DR answer would be that it's a virtually zero configuration way to guarantee stylistic consistency.
- sergiotapia 10y agoIt's really better than a linter because a linter warns you of style errors, but you still need to invest time to fit it. Whereas this just formats everything for you, set it up on file save and you're done. No more discussions on style and whatnot, your codebase is suddenly uniform. Go has that with `go fmt` and it's very liberating.
- sotojuan 10y agoAside from being good software, it was created by a prominent person in the React/JS community and co-developed by a well-known Facebook engineer in the React team. It was lucky to be adopted by large companies quickly, but a) easier to adopt something Facebook approved™ and b) it's painless to adopt since it does everything automatically. All that, being a great tool, and some Twitter/Medium promotion = success.