-
Notifications
You must be signed in to change notification settings - Fork 406
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
Inconsistent Formatting between Prettier and Org #4162
Comments
Hi @jonny-harte, thank you for your post. This is a known issue, we will be working on this to provide you with a better experience. Please stay tuned. |
Thanks @floralan. Will this take into account visualforce pages, components and email templates etc? As there are a lot of inconsistencies between whats deployed after being formatted with prettier and what i then retrieved from the Org. |
Would love to see some activity on this issue. Some other examples of this, even with prettier-plugin-apex, are Role, Layout and WebLink metadata files. Would be great if we could use |
Is there any movement for this one? @floralan |
Please could you tell us about this is going ? |
Sorry for the late reply as I'm not working on this product anymore. |
@AnanyaJha any updates for us? While I appreciate all the work that has gone into prettier-plugin-apex that work is being done by folks in the community and not Salesforce themselves. The plugin is not very efficient and in large projects it consumes a ton of hardware resources (my computer sounds like a rocket ship about to take off). |
Hi @gfarb thanks for bumping this. We'll start triaging this and will let you know once we've pulled it into our backlog. |
Hi @AnanyaJha , are you making progress on this one ? |
Still no progress or updates on this? |
Summary
Every time you retrieve source from Org it detects all Aura & LWC components as different when using prettier and/or the pre-commit hook in a project. This is because prettier adds a new lines to the end of files and the Org removes them.
This has become more of an issue since the updated source control and is making diff detection very noisy and unmanageable in large projects.
I know there is an prettier-plugin-apex plugin which removes the last line (works well!). Could this be expanded to all file types with options in .prettierrc?
Steps To Reproduce:
Expected result
No Changes detected.
Actual result
Changes detected, last line from files removed.
Salesforce Extension Version in VS Code:
v54.12.0
SFDX CLI Version:
sfdx-cli/7.150.0 darwin-x64 node-v16.15.0
OS and version:
MacOS 12.3.1
The text was updated successfully, but these errors were encountered: