Prettier 1.0
jlongster.com
Prettier 1.0
1–10 of 78 posts
Re: Prettier 1.0
#2I'm hoping to see similar efforts on project file/folder structure at some point. How often do two node projects created by different engineering teams end up with the same folder/file structure? There's nearly no strong community convention, unlike many other languages/frameworks. Rails, for example, famously touts that any engineer can walk onto another Rails project and have a reasonable suspicion of where to find a particular piece of code.
1: https://github.com/airbnb/javascript 2: https://twitter.com/hshoff/status/784205839347232768
Re: Prettier 1.0
#3Re: Prettier 1.0
#4Re: Prettier 1.0
#5Re: Prettier 1.0
#6It would be useful to compare with "eslint --fix" given Eslint can already reformat (on top of linting non-style things, and projects usually already have Eslint settings).
Re: Prettier 1.0
#7Re: Prettier 1.0
#8Re: Prettier 1.0
#9Highlights of the 1.0 announcement:
- production-ready (and used, eg; React, Oculus, Cloudflare, etc)
- --no-semi option
- --use-tabs option
- parens that help indicate precedence
- many formatting improvements
There are a ton of edge cases in this work that really matter (read through the announcement for a few). Speaking as a contributor, this is some of the hardest stuff I've ever done (beats building a JS superset, http://lightscript.org). I've been super impressed by the prettier team.
Re: Prettier 1.0
#10It would be useful to compare with "eslint --fix" given Eslint can already reformat (on top of linting non-style things, and projects usually already have Eslint settings).
Unlike ESLint ... everything is fixable. This works because Prettier never "checks" anything; it ... parses your JavaScript into an AST (Abstract Syntax Tree) and pretty-prints the AST, completely ignoring any of the original formatting.
There's an extremely important piece missing from existing styling tools: the maximum line length ... (ESLint never knows how to fix it).