Skip to content

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

Open

Description

@julienw

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?

Activity

  1. changed the title [-]Change the prettier printWidth option back to the default[/-] [+]Change the prettier printWidth option back to the default, or something smaller[/+] on Feb 8, 2024
  2. rniwa commented on Feb 8, 2024

    @rniwa
    Member

    What is the default value?

  3. julienw commented on Feb 8, 2024

    @julienw
    ContributorAuthor

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

  4. rniwa commented on Feb 8, 2024

    @rniwa
    Member

    80 sounds way too small.

  5. julienw commented on Feb 8, 2024

    @julienw
    ContributorAuthor

    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.

  6. added a commit that references this issue on Feb 9, 2024
    5c1e296
  7. julienw commented on Feb 9, 2024

    @julienw
    ContributorAuthor

    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.

  8. rniwa commented on Feb 14, 2024

    @rniwa
    Member

    I would have picked a higher number like 160.

  9. added 2 commits that reference this issue on Mar 5, 2024
    ec73337
    231c0d7
  10. added a commit that references this issue on Jun 5, 2024
    e62c878
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions