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

fix(deps): update to prettier 3.3.3, stylelint-prettier 5.0.2 #17799

Merged
merged 26 commits into from
Oct 23, 2024

Conversation

2nikhiltom
Copy link
Contributor

@2nikhiltom 2nikhiltom commented Oct 18, 2024

Closes #16604 #17406

A continuation of #17770, this updates prettier and stylelint-prettier.

The files changed are so large because this also includes all the related reformatting of the codebase based on the updated deps.

Changelog

Changed

  • update prettier to v3
  • update stylelint-prettier to v5
  • re-add prettier v2 under an alias to avoid ESM issues with jest

🛑 This is a branch off #17770, this shouldn't be merged until that one is merged first. Merged! 👍

@2nikhiltom 2nikhiltom changed the title Stylelint16 prettier3 eslint plugin prettier 5a new fix(deps): update stylelint16 and prettier3.2.5 Oct 18, 2024
Copy link

netlify bot commented Oct 18, 2024

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit 5e3f675
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-web-components/deploys/67192e614dd9f10008c5f004
😎 Deploy Preview https://deploy-preview-17799--v11-carbon-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Oct 18, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 5e3f675
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/67192e61ec90a2000877e357
😎 Deploy Preview https://deploy-preview-17799--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Oct 18, 2024

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit 5e3f675
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/67192e613bce8800083f29f2
😎 Deploy Preview https://deploy-preview-17799--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@tay1orjones
Copy link
Member

I just pushed three commits here. The first updates our internal usages of prettier to use an prettier2 alias of prettier@v2. Reason being that prettier 3's commonjs uses an import statement which causes jest to fail because it doesn't yet support esmodules out of the box. This allows us to safely have both installed - prettier2 is used for the above, and prettier 3 will be used for everything else (yarn format, etc.)

We can remove this alias when one of a few things happens:

  • prettier updates to no longer use an import in the cjs export (unlikely they will do this)
  • jest 30 is released that supports esm out of the box

The second and third commit is the output of running yarn format. The third one was a few stragglers that weren't caught until I temporarily removed --cache from the yarn format script

@tay1orjones tay1orjones marked this pull request as ready for review October 18, 2024 18:48
@tay1orjones tay1orjones requested a review from a team as a code owner October 18, 2024 18:48
@tay1orjones tay1orjones changed the title fix(deps): update stylelint16 and prettier3.2.5 fix(deps): update to prettier 3.2.5, stylelint-prettier 5.0.2 Oct 18, 2024

This comment was marked as off-topic.

@tay1orjones
Copy link
Member

I think we should ignore coverage reports on this one. It's seeing tons of files as "changed" and therefore needing more tests, but they've just been reformatted. We'll hit those components through #16319

Copy link
Member

@emyarod emyarod left a comment

Choose a reason for hiding this comment

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

looks good to me!

@kennylam kennylam changed the title fix(deps): update to prettier 3.2.5, stylelint-prettier 5.0.2 fix(deps): update to prettier 3.3.3, stylelint-prettier 5.0.2 Oct 23, 2024
@kennylam kennylam added status: ready to merge 🎉 dependencies Pull requests that update a dependency file and removed status: ready for review 👀 labels Oct 23, 2024
@kennylam kennylam added this pull request to the merge queue Oct 23, 2024
Merged via the queue into main with commit 66c14c2 Oct 23, 2024
39 of 40 checks passed
@kennylam kennylam deleted the stylelint16-prettier3-eslint-plugin-prettier-5a_new branch October 23, 2024 17:54
Copy link
Contributor

The content of this pull request will be made available as part of our next release. For the full schedule of upcoming releases, check out our Release Radar page.

@carbon-automation
Copy link
Contributor

Hey there! v11.69.0 was just released that references this issue/PR.

irfadkp pushed a commit to irfadkp/carbon that referenced this pull request Oct 24, 2024
…-design-system#17799)

* ci: stylelint16_upgrade

* fix: dedupe changes

* fix: updates to stylelint16

* refactor: added old rules back

* refactor: revert rules

* fix: updates SCSS files &  migrate to Stylelint 16.0.0

* refactor: null check

* chore: yarn dedupe changes

* refactor: refined package.json, updated rules object

* refactor: cleaned comments & package.json

* refactor: cleaned rules object

* fix(deps): update stylelint16 & prettier3

* fix(deps): stylelint-prettier5

* fix(test): update test utils to use prettier v2

* chore: run yarn format w/ prettier 3

* chore: run yarn format with prettier 3

* chore: run yarn format

* chore(deps): upgrade prettier to 3.3.3

* chore(prettier): format code

* chore(prettier): format code

---------

Co-authored-by: Taylor Jones <[email protected]>
Co-authored-by: Taylor Jones <[email protected]>
Co-authored-by: Kenny Lam <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file status: ready to merge 🎉
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: Update stylelint-config-carbon for Stylelint 16
4 participants