Prettier 2.0 (old)
Problem
Note added by @j-f1: This is NOT the current plan for Prettier v2.0. We’ve significantly scaled back our plans for what Prettier 2.0 will do, allowing us to get a less-controversial release out sooner: https://github.com/prettier/prettier/issues/6888 --- I've been thinking a bit about what we would do if (don't create a milestone just yet :wink:) we were to do a Prettier 2.0 release with some API/CLI breaking changes. No significant changes to code formatting other than perhaps changing some defaults. Easy? #68/#3469 - Change default value for `trailingComma` to `"es5"`. The diff advantages alone are excellent, and this seems to be commonplace among the most popular JS projects. CLI: #2691 - CLI defaults to `"*/.{js,ts,...}"`. People should just be able to do `prettier --write` without passing messy globs _#0CJS_ #2846 - Replace the "parser" option with "language". e.g. `echo ".foo {}" | prettier --language css` Keep `--parser flow` or perhaps support something like `--parser.js flow` for future extensibility. Remove `--flow-parser` option. Has been deprecated for a long time. For debate - #838 - Consistently add quotes to object keys. e.g. put quotes around `origin` in this example: [code block] - Change the default value for `singleQuote` to `true` Airbnb, standard, xo, and probably the majority of JS devs prefer this. Maybe do a Twitter poll to gauge opinions on this. > To be clear, the Airbnb config requires single quotes for JS and doub
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: Prettier 2.0 (old)
- drop Node v4 (Maintenance LTS End: April 2018) - remove all deprecated options - remove `exitCode: 2` from CLI, or figure out when should we apply `exitCode: 2` as it's very unclear now.
Trust Score
5 verifications
- 1
drop Node v4 (Maintenance LTS End: April 2018)
- remove all deprecated options - remove `exitCode: 2` from CLI, or figure out when should we apply `exitCode: 2` as it's very unclear now.
Validation
Resolved in prettier/prettier GitHub issue #3503. Community reactions: 11 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep