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

chore(deps): upgrade prettier from v1.x to v3+ #12290

Merged
merged 2 commits into from
Nov 30, 2023

Conversation

agilgur5
Copy link
Contributor

@agilgur5 agilgur5 commented Nov 29, 2023

Follow-up to #12163, which unblocked the prettier upgrade
Partial fix for #11740 as well

Motivation

Update to the latest version of prettier. 1.x has not received an update in 4 years.

Also unblock using newer TS syntax such as import type and export type from TS 3.8 that Prettier v2+ added support for

Modifications

  • update prettier from v1.x to v3+ and correspondingly update eslint-config-prettier from v3.x to v5+

  • reformat UI codebase according to prettier v3 rules

    • added two new "preferences" to dramatically shrink the diff (by an order of magnitude or two)
      • "trailingComma": "none" and "arrowParens": "avoid" preserve the existing style of the codebase
        • to be explicit, these are not my preferences, just that which was already in the codebase
      • we may certainly want to change these later, but at this time I chose to reduce the diff / number of changes

additional related manual formatting

  • alphabetize .prettierrc

    • only the last two preferences had to be moved
  • a few promise chains were reformatted to long one-liners

Verification

make lint / yarn lint pass

- and correspondingly update `eslint-config-prettier` from v3.x to v5+

- reformat UI codebase according to `prettier` v3 rules
  - added two new "preferences" to dramatically shrink the diff (by an order of magnitude or two)
    - `"trailingComma": "none"` and `"arrowParens": "avoid"` preserve the existing style of the codebase
      - to be explicit, these are **not** _my_ preferences, just that which was already in the codebase
    - we may certainly want to change these later, but at this time I chose to reduce the number of changes

Signed-off-by: Anton Gilgur <[email protected]>
- alphabetize `.prettierrc`
  - only the last two preferences had to be moved

- a few promise chains were reformatted to long one-liners
  - instead change these to use newer async/await syntax

Signed-off-by: Anton Gilgur <[email protected]>
@agilgur5 agilgur5 added type/dependencies PRs and issues specific to updating dependencies area/ui javascript Pull requests that update Javascript dependencies labels Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui javascript Pull requests that update Javascript dependencies type/dependencies PRs and issues specific to updating dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants