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

Update prettier to v3 #12206

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update prettier to v3 #12206

wants to merge 1 commit into from

Conversation

jjspace
Copy link
Contributor

@jjspace jjspace commented Sep 18, 2024

Description

Updates prettier to v3.3.0 which crosses the major version 3 breaking changes

This is a very big pr touching nearly all our source files but all the changes are basically identical.

Key changes:

  • Trailing commas are now always included (a very good change IMO), this is a majority of the changes
  • greatly improved line wrapping logic for readability (see below)
  • prefer lowercase doctype over DOCTYPE
// before 3.0 it preferred parens and brackets
const tileset = await Cesium.Cesium3DTileset.fromIonAssetId(
  1
);

// after 3.0 it actually somewhat uses context, much more readable imo
const tileset =
  await Cesium.Cesium3DTileset.fromIonAssetId(1);

I also added a new .prettierrc specifically for the Sandcastle Gallery to allow a slightly wider line with to account for the indentation that's removed when sandcastles are actually rendered. This should produce code that matches prettier's default 80 when in the browser editor.

When we decide to merge this I'll add some new git tags and post a guide on how to update other branches easier.

Issue number and link

Fixes #12172

Testing plan

  • Run npm run prettier and make sure there are no changed files
    • or just run npm run prettier-check and make sure it doesn't fail
  • make sure specs still pass
  • functionally everything should be the same so primarily review the files themselves.

Author checklist

  • I have submitted a Contributor License Agreement
  • I have added my name to CONTRIBUTORS.md
  • I have updated CHANGES.md with a short summary of my change
  • I have added or updated unit tests to ensure consistent code coverage
  • I have updated the inline documentation, and included code examples where relevant
  • I have performed a self-review of my code

Copy link

Thank you for the pull request, @jjspace!

✅ We can confirm we have a CLA on file for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update prettier
1 participant