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

Switch to @prettier/sync for sync Nunjucks formatting #3971

Merged
merged 1 commit into from
Jul 19, 2023

Conversation

colinrotherham
Copy link
Contributor

@colinrotherham colinrotherham commented Jul 17, 2023

Prettier recently switched to a Promise-based API which affects Nunjucks macro options format()

Prettier 3.0: Hello, ECMAScript Modules!
https://prettier.io/blog/2023/07/05/3.0.0.html

We'd need to replace Nunjucks for loops with asyncEach to give include blocks asynchronous support so we held the Review app on prettier@2 for now:

But this PR now takes the advice from the blog article above:

If you still need sync APIs, you can try @prettier/sync

With thanks to @fisker we can continue using tsc and our ESLint plugins:

@colinrotherham colinrotherham added nunjucks dependencies Pull requests that update a dependency file labels Jul 17, 2023
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3971 July 17, 2023 12:29 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3971 July 17, 2023 12:37 Inactive
We no longer need to hold `prettier@2` for the review app
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3971 July 19, 2023 07:01 Inactive
@colinrotherham colinrotherham merged commit b1c4e9f into main Jul 19, 2023
@colinrotherham colinrotherham deleted the prettier-sync branch July 19, 2023 11:53
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 nunjucks
Projects
Development

Successfully merging this pull request may close these issues.

4 participants