Skip to content

chore(build): Upgrade to Prettier 2.x #4452

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

Merged
merged 3 commits into from
Jan 26, 2022
Merged

Conversation

lobsterkatie
Copy link
Member

This upgrades all of our packages to use the latest version of Prettier, which is currently 2.5.1, in order to have support for linting of code written in typescript 3.8 and above.

When Prettier went to 2.0, it introduced some changes to its defaults, most notably:

  • casting between two unlike types, with a cast to unknown in between, no longer requires parentheses around the first cast,
  • inline functions defined with the function keyword now have a space after the word function, and
  • indentation of multi-line expressions and statements is adjusted, sometimes to make more lines, sometimes fewer.

All three of these have been applied to all of the code in the repo.

The final change to defaults - to make it so that parameter lists in arrow functions always have parentheses around them, even if they only consist of one parameter - led to a lot of visual noise, so it's been overridden to preserve the current formatting.

@github-actions
Copy link
Contributor

size-limit report

Path Base Size (3f3c75b) Current Size Change
@sentry/browser - CDN Bundle (gzipped) 19.68 KB 19.69 KB +0.01% 🔺
@sentry/browser - CDN Bundle (minified) 62.85 KB 62.86 KB +0.01% 🔺
@sentry/browser - Webpack 22.2 KB 22.2 KB 0%
@sentry/browser - Webpack - gzip = false 75.99 KB 75.99 KB 0%
@sentry/react - Webpack 22.24 KB 22.24 KB 0%
@sentry/nextjs Client - Webpack 46.22 KB 46.22 KB 0%
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 28.21 KB 28.22 KB +0.01% 🔺

Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rip rebasing off master

@lobsterkatie lobsterkatie merged commit 8cbcff2 into master Jan 26, 2022
@lobsterkatie lobsterkatie deleted the kmclb-upgrade-to-prettier-2 branch January 26, 2022 15:40
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.

3 participants