roberto-butti / some-drops-of-javascript

This book collects some useful, unknown, underrated JavaScript functions discovered and learned while using JavaScript daily.
https://drops-of-javascript.hi-folks.dev/
Other
137 stars 40 forks source link

Update to the latest version of Prettier #48

Closed wdym69 closed 4 days ago

wdym69 commented 5 days ago

This PR updates the project to use the latest version of Prettier throughout the examples directory.

Notable changes in Prettier 3.3.3: Prettier 3.3.3 introduces updates to the formatting of conditional expressions that use the nullish coalescing operator (??)

// Input
foo ? bar ?? foo : baz;
foo ?? bar ? a : b;
a ? b : foo ?? bar;

// Prettier 3.3.2
foo ? bar ?? foo : baz;
foo ?? bar ? a : b;
a ? b : foo ?? bar;

// Prettier 3.3.3
foo ? (bar ?? foo) : baz;
(foo ?? bar) ? a : b;
a ? b : (foo ?? bar);

References: Prettier_Changelog

vercel[bot] commented 5 days ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
some-drops-of-javascript ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 18, 2024 6:19am
roberto-butti commented 4 days ago

Merged the syntax check. Thank you @wdym69 For the splice documentation and example, @wdym69 should i merge the #49 or the #44 or are you going to open a new PR?

wdym69 commented 4 days ago

I just opened a new PR for it @roberto-butti . Thankyou for all the guidance @roberto-butti .