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: bump Prettier and Prettier accessories to 2.x #2387

Merged
merged 3 commits into from
May 24, 2021
Merged

chore: bump Prettier and Prettier accessories to 2.x #2387

merged 3 commits into from
May 24, 2021

Conversation

JoshuaKGoldberg
Copy link
Contributor

What:

Bumps the prettier-related packages in package.json to their latest versions.

Why:

Newer versions of Prettier support newer TypeScript syntax things such as template type strings and type imports.

How:

yarn prettier "./*" --write

Excluded Markdown files because some of them had a lot of noise.

Checklist:

  • Documentation
  • Tests
  • Code complete
  • Changeset

I realize it is a little weird for me to send this kind of touch-many-files PR, as someone who has yet to meaningfully contribute to Emotion. But it's going to be very useful for #2360. No worries if someone else takes it over in a new PR 😄

@changeset-bot
Copy link

changeset-bot bot commented May 23, 2021

⚠️ No Changeset found

Latest commit: 97fa025

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as draft May 23, 2021 12:30
@codesandbox-ci
Copy link

codesandbox-ci bot commented May 23, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 97fa025:

Sandbox Source
Emotion Configuration

@codecov
Copy link

codecov bot commented May 23, 2021

Codecov Report

Merging #2387 (97fa025) into main (5af8486) will decrease coverage by 0.00%.
The diff coverage is 99.51%.

Impacted Files Coverage Δ
packages/eslint-plugin/src/rules/pkg-renaming.js 95.65% <ø> (ø)
packages/react/src/emotion-element.js 100.00% <ø> (ø)
packages/server/test/util.js 96.61% <ø> (ø)
packages/babel-plugin/src/emotion-macro.js 70.37% <90.00%> (ø)
packages/babel-plugin-jsx-pragmatic/src/index.js 95.83% <100.00%> (ø)
packages/babel-plugin/src/index.js 94.49% <100.00%> (ø)
packages/css-prettifier/src/index.js 100.00% <100.00%> (ø)
packages/css/src/create-instance.js 100.00% <100.00%> (ø)
...ges/eslint-plugin/src/rules/import-from-emotion.js 94.11% <100.00%> (ø)
packages/is-prop-valid/src/index.js 83.33% <100.00%> (ø)
... and 14 more

Excluded Markdown files because some of them had a lot of noise.
@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as ready for review May 23, 2021 12:41
Comment on lines +1 to +4
arrowParens: avoid
semi: false
singleQuote: true
trailingComma: none
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Personally I agree with the Prettier defaults here, but for the sake of touching fewer files added the overrides to preserve this repo's old behavior. Thoughts?

Suggested change
arrowParens: avoid
semi: false
singleQuote: true
trailingComma: none
semi: false
singleQuote: true

Copy link
Member

Choose a reason for hiding this comment

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

Ye, keeping the output as close to what we have in the repo currently is preferable (although I also agree that we could switch defaults of those 2 later on)

docs/flow.mdx Outdated Show resolved Hide resolved
@JoshuaKGoldberg JoshuaKGoldberg requested a review from Andarist May 24, 2021 14:02
@Andarist Andarist merged commit 23f43ab into emotion-js:main May 24, 2021
@Andarist
Copy link
Member

We'll have to merge this into the ts-migration branch now, the merge conflicts might be... brutal 😅

@JoshuaKGoldberg JoshuaKGoldberg deleted the prettier-2 branch May 24, 2021 15:15
@Andarist
Copy link
Member

@JoshuaKGoldberg I've handled the merge, it wasn't that bad after all - luckily there were no real code changes, just formatting.

Next step: get this PR merged - #2360

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.

2 participants