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

Apply formatting to vendor/wp-now files #547

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

fluiddot
Copy link
Contributor

@fluiddot fluiddot commented Sep 18, 2024

Related to #510 (comment) and https://github.com/Automattic/local-environment/pull/198#discussion_r1540910017.

Proposed Changes

wp-now files were ignored in Prettier until we made a decision on what formatting to use (they are formatted with this configuration). My proposal is to use the same Prettier configuration we have in the project. However, this implies updating most of the files.

Testing Instructions

  • This PR only re-formats the files so it shouldn't produce any change in the logic. Hence, we don't need to test anything specifically, we could simply run a short smoke test.

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@wojtekn
Copy link
Contributor

wojtekn commented Sep 18, 2024

How will it influence future work on merging wp-now changes from the external repository to the studio?

@fluiddot
Copy link
Contributor Author

How will it influence future work on merging wp-now changes from the external repository to the studio?

Good question. It will require re-formatting incoming files, which is likely to produce file conflicts. However, at this point with all the tweaks/updates we've made to wp-now files, I wonder if we'll consider updating it from the external repository. My perception is that the current wp-now version used in the Studio app has diverged from the original version.

Besides, wp-now might be replaced with Playground CLI which offers quite similar features. Since Playground CLI will be more maintained and updated than wp-now, maybe we could consider adopting this package instead.

@fluiddot
Copy link
Contributor Author

[...] It will require re-formatting incoming files, which is likely to produce file conflicts. [...]

For re-formatting all files under vendor/wp-now, we can run the command:

  • npx prettier --write "vendor/wp-now/**/*.{js,jsx,ts,tsx}".

@fluiddot fluiddot merged commit 8e6816e into trunk Sep 18, 2024
12 checks passed
@fluiddot fluiddot deleted the update/apply-formatting-wp-now branch September 18, 2024 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants