Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
julienw opened this issue Feb 8, 2024 · 6 comments · May be fixed by #371
Open

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

julienw opened this issue Feb 8, 2024 · 6 comments · May be fixed by #371
Labels

Comments

@julienw
Copy link
Contributor

julienw commented Feb 8, 2024

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?

@julienw julienw added the v3.1 label Feb 8, 2024
@julienw julienw changed the title Change the prettier printWidth option back to the default Change the prettier printWidth option back to the default, or something smaller Feb 8, 2024
@rniwa
Copy link
Member

rniwa commented Feb 8, 2024

What is the default value?

@julienw
Copy link
Contributor Author

julienw commented Feb 8, 2024

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

@rniwa
Copy link
Member

rniwa commented Feb 8, 2024

80 sounds way too small.

@julienw
Copy link
Contributor Author

julienw commented Feb 8, 2024

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
Copy link
Contributor Author

julienw commented Feb 9, 2024

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

Here is IMO a compelling example: 5c1e296#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
Copy link
Member

rniwa commented Feb 14, 2024

I would have picked a higher number like 160.

julienw added a commit to julienw/Speedometer that referenced this issue Mar 5, 2024
julienw added a commit to julienw/Speedometer that referenced this issue Mar 7, 2024
julienw added a commit to julienw/Speedometer that referenced this issue Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants