Replies: 1 comment
-
|
You can customize YAML output by parameters (see https://docs.weblate.org/en/latest/formats.html#file-format-parameters). That should make it possible to match your Prettier configuration. PS: If you are on older Weblate version, this was before configured by add-on: https://docs.weblate.org/en/latest/admin/addons.html#customize-yaml-output |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the problem
I use Weblate in a project which enforces common formatting using Prettier. The CI validates that all files supported by Prettier are formatted by Prettier. Weblate does not format the YAML files using Prettier causing every commit from Weblate to fail CI.
Currently I need to manually run Prettier on every PR created by Weblate before merging. That's doable but not a great developer experience.
Solution brainstorm
Prettier is quite standard in JavaScript ecosystem. It would be great if Weblate could format files optionally using Prettier. It should use the project's Prettier version and configuration as the formatting may depend on that.
Describe alternatives you have considered
Weblate could provide a flexible pre-commit configuration allowing any script to run. But that increases the complexity a lot as the tools need to be installed before. Additionally it may increase the infrastructure costs a lot for the SaaS offering. And it opens up many potential attack vendors.
Screenshots
No response
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions