-
Notifications
You must be signed in to change notification settings - Fork 7
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
Format YAML without conflict with prettier
#153
Comments
I'm facing a similar issue - more generally I would expect this tool to not change formatting whatsoever. Going for prettier formatting might clash with other formatters (or configurations) used elsewhere. I'm encountering the following specific unexpected reformatting: example: >
- sit amet justo donec enim diam vulputate ut pharetra sit amet aliquam id diam
- maecenas ultricies mi eget mauris pharetra et ultrices neque ornare aenean
+ sit amet justo donec enim diam vulputate ut pharetra sit amet aliquam id diam maecenas ultricies mi eget mauris pharetra et ultrices neque ornare aenean |
I agree. 🙂 |
Unfortunately this is a side effect of parsing the YAML file, then serializing it again. We could try parsing to get the data, then using search + replace on the source file to maintain formatting but that could be brittle. If anyone wants to try raising a PR with that approach to preserve formatting, I'd be happy to review |
Hi,
Would it be possible to output YAML in a way that doesn't clash with
prettier
?pin-github-actions
wants files formatted like this:prettier
formats them back like this:The text was updated successfully, but these errors were encountered: