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): update dependency prettier to v3 + stylelint #1623

Closed
wants to merge 12 commits into from

Conversation

imagoiq
Copy link
Contributor

@imagoiq imagoiq commented Jul 10, 2023

What

  • Update together
    • prettier from 2.8.8 to 3.0.0
    • stylelint-prettier from 2.0.0 to 4.0.0
    • stylelint-config-sass-guidelines from 9.0.1 to 10.0.0
  • Replaced Prettier with Prettier standalone version for format-code.pipe.ts as it's the version to be used in browser without node dependencies.

stylelint-config-sass-guidelines was not waiting because it has a dependency on stylelint-order (see Philipp's comment:
bjankord/stylelint-config-sass-guidelines#214)

close: #1619
close: #1620

@changeset-bot
Copy link

changeset-bot bot commented Jul 10, 2023

⚠️ No Changeset found

Latest commit: 44803ca

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

"max-nesting-depth": 5,
"selector-max-compound-selectors": 5,
"selector-max-id": 1,
"selector-no-qualifying-type": [true, { "ignore": ["attribute", "class"] }],
"function-url-quotes": null
"function-url-quotes": null,
"scss/dollar-variable-colon-space-after": "always-single-line"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Comment on lines +122 to +123
const content = await prettier.format(distElement, PRETTIER_OPTIONS);
const contentWithoutBreak = content.replace(/(\n|\r\n)$/, '');
Copy link
Contributor Author

@imagoiq imagoiq Jul 11, 2023

Choose a reason for hiding this comment

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

format method is now async: prettier/prettier#4459 (comment)

@imagoiq imagoiq force-pushed the chore-prettier-3-stylelint branch from 5bfdabe to e00a059 Compare July 11, 2023 06:09
@imagoiq imagoiq linked an issue Jul 11, 2023 that may be closed by this pull request
@imagoiq imagoiq added the on hold Wait for something to be done, before continue working on this Issue label Jul 11, 2023
@swisspost-bot
Copy link
Contributor

swisspost-bot commented Jul 12, 2023

Preview environment ready: https://preview-1623--swisspost-web-frontend.netlify.app
Preview environment ready: https://preview-1623--swisspost-design-system-next-v7.netlify.app
Preview environment ready: https://preview-1623--swisspost-design-system-next.netlify.app

Comment on lines +20 to +22
transition:
z-index 0s ease (0.5 * button.$btn-transition-duration),
button.$btn-transition;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@imagoiq imagoiq mentioned this pull request Jul 13, 2023
@imagoiq imagoiq force-pushed the chore-prettier-3-stylelint branch from b300d57 to 2a7a7a1 Compare July 20, 2023 09:27
@imagoiq
Copy link
Contributor Author

imagoiq commented Jul 20, 2023

Preview doesn't work with v7 currently.

Here is the error:
image

Format method from prettier is now async and storybook transform parameter doesn't seem to support it (it's hard to find some doc about it). Prettier recommends to use @prettier/sync if we still need a synchronous method, but it's not the standalone version and therefore the issue above with the path from Node. Adding the following code to package.json doesn't have an impact either:

  "browser": {
    "path": false
  }

Might worth, to check storybookjs/storybook#12687

UPDATE:
There is no way to use the sync version in browser:
prettier/prettier#15235

To watch: storybookjs/storybook#23879

@imagoiq imagoiq force-pushed the chore-prettier-3-stylelint branch from 9bddcd2 to fcd824a Compare July 27, 2023 09:40
@sonarcloud
Copy link

sonarcloud bot commented Aug 8, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
2.6% 2.6% Duplication

@imagoiq imagoiq marked this pull request as draft August 8, 2023 13:25
@imagoiq imagoiq closed this Sep 21, 2023
@imagoiq imagoiq deleted the chore-prettier-3-stylelint branch September 21, 2023 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on hold Wait for something to be done, before continue working on this Issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update to Prettier 3
2 participants