WebKit / Speedometer

An open source repository for the Speedometer benchmark
Other
592 stars 68 forks source link

Change the prettier printWidth option back to the default, or something smaller #370

Open julienw opened 6 months ago

julienw commented 6 months ago

The current value is 250, this makes very long lines. Can we put it back to the default, or at least to a smaller value such a 120 if the default is too low because of the tab width?

rniwa commented 6 months ago

What is the default value?

julienw commented 6 months ago

Default is 80, but it's not a hard limit. See https://prettier.io/docs/en/options.html#print-width for more information

rniwa commented 6 months ago

80 sounds way too small.

julienw commented 6 months ago

This works well in most projects with a tabwidth of 2, but in speedometer with a tab width of 4, I believe 120 would work better indeed.

julienw commented 6 months ago

I made a PR with a value of 120 so that we can see the result.

Here is IMO a compelling example: https://github.com/WebKit/Speedometer/pull/371/commits/5c1e2964853a6a169aeb2d0c72b29bfd03e3132f#diff-2d8fb1419de7a1081886af05fca74332a3a6d307b322f87c0a127ab46a550344

I find the new format easier to read. But I could also be just used to it, so happy to hear other opinions.

rniwa commented 6 months ago

I would have picked a higher number like 160.