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

Prettier 3 Plugins #135

Merged
merged 8 commits into from
Jun 1, 2024
Merged

Prettier 3 Plugins #135

merged 8 commits into from
Jun 1, 2024

Conversation

jscheid
Copy link
Owner

@jscheid jscheid commented May 27, 2024

This is adding support for Prettier 3 when used with plugins. See commit messages for details.

jscheid added 3 commits May 27, 2024 21:18
Wrap the majority of the bootstrap code in a function to scope
variables and prevent them from polluting the global namespace, where
they might conflict with variables used by the core JS code.
- Translate plugin module names to absolute paths relative to the
  Prettier installation found.
- Pass process environment through to main JS code.
This is for Prettier 3 compat, as they've changed the default
apparently.
@jscheid jscheid requested a review from asbish May 27, 2024 19:53
Copy link
Collaborator

@asbish asbish left a comment

Choose a reason for hiding this comment

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

Thank you for catching what I missed. I've tested this PR and confirmed that it works correctly with several plugins and Yarn Berry.
I've left some minor comments in review.

prettier-el.js Outdated Show resolved Hide resolved
prettier-el.js Show resolved Hide resolved
@jscheid jscheid merged commit 5965223 into master Jun 1, 2024
5 checks passed
@jscheid jscheid deleted the prettier-3-plugins branch June 1, 2024 13:13
github-actions bot pushed a commit that referenced this pull request Jun 1, 2024
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