Upgrade Prettier to 1.19.x
Categories
(Developer Infrastructure :: Lint and Formatting, task)
Tracking
(Not tracked)
People
(Reporter: standard8, Assigned: Mardak)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
Prettier 1.19.x has support for nullish coalescing and Optional chaining:
https://prettier.io/blog/2019/11/09/1.19.0.html
Once we've done the smaller update to 1.18.x (bug 1620218), we should look at doing this slightly larger update - the main difference I think is that nested array/object formatting has changed.
Comment 1•5 years ago
|
||
Note that upgrading prettier will require a reformat of the entire tree:
We recommend pinning an exact version of prettier in your package.json as we introduce stylistic changes in patch releases.
I suspect this is fine, but is probably something we want to take into account. CCing vporof for his thoughts...
Reporter | ||
Comment 2•5 years ago
|
||
(In reply to Dan Mosedale (:dmose, :dmosedale) from comment #1)
Note that upgrading prettier will require a reformat of the entire tree:
As we're already on prettier, this isn't a massive reformat. So this is no more extensive than running ./mach eslint --fix, and passing the result through try.
I need to take another look, but I'm pretty sure that although there's a reasonable amount of changes, we probably don't need tree-closing for this. Maybe just landing in a quiet spot.
This is what I was referring to with "the main difference I think is that nested array/object formatting has changed.".
Assignee | ||
Comment 3•5 years ago
•
|
||
Looks like there's more files touched in this latest update but fewer lines affected(deleted) than the previous update from bug 1620218:
1.17.0 -> 1.18.2
232 files changed, 419 insertions(+), 1226 deletions(-)
1.18.2 -> 1.19.1:
357 files changed, 2630 insertions(+), 1124 deletions(-)
The previous update generally consolidated multiline strings (3 lines into 1) while this update is mostly what standard8 mentioned in comment 0 with nested expansion plus some changes to not needing parens for same-operator expressions.
Assignee | ||
Comment 4•5 years ago
|
||
Updated•5 years ago
|
Assignee | ||
Comment 5•5 years ago
|
||
Depends on D66128
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/73dac954fb5b
comm-central automatic code fixes for Prettier 1.19.1 upgrade. rs=eslint
Comment 8•5 years ago
|
||
Not sure why pulsebot hasn't noticed this landed on mozilla-central
https://hg.mozilla.org/mozilla-central/rev/4c201c81234a16e0bd63373036690ce4dd412fb3
https://hg.mozilla.org/mozilla-central/rev/50d4048d635ee7b90600a2e041595f40f56269dc
Comment 9•5 years ago
|
||
bugherder |
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Updated•2 years ago
|
Description
•