Skip to content

Make Prettier format symlinked files in case direct path is provided to CLI #17475

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

RIP21
Copy link

@RIP21 RIP21 commented May 12, 2025

Description

Make it so prettier follows symlinks, but only if this symlink is provided with explicit path and is file and not a directory.\

Fixes #15843

Checklist

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory).
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Copy link

netlify bot commented May 12, 2025

Deploy Preview for prettier ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 4bc7140
🔍 Latest deploy log https://app.netlify.com/sites/prettier/deploys/68226ea3871c730008aadbdb
😎 Deploy Preview https://deploy-preview-17475--prettier.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.

@RIP21
Copy link
Author

RIP21 commented May 12, 2025

I have struggles with tests. I've added mine that worked perfectly, but then figured there are already existing tests for that, so tried to modify them to get some unexpected/weird results. Will be glad if somebody help if this changes actually has any chances of being merged and is fine with core maintainers, obviously.

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.

Prettier 3.x refuses to format an explicitly given path that is a symbolic link
1 participant