phrase / phrase-cli

CLI for the Phrase API
https://developers.phrase.com
MIT License
42 stars 6 forks source link

Files downloaded by `phrase pull` should end with newline #130

Open dkimmich-onventis opened 10 months ago

dkimmich-onventis commented 10 months ago

Files should end with newline, otherwise there can be issues with version control, such as unexpected results of diff and blame. When using phrase pull however, the file which is downloaded doesn't contain a final newline. If a code style tool like prettier is used, this causes a warning and can lead to additional work by the developer to either add a newline every time the file is downloaded, or exclude translation files from formatting.

The proposed solution is to add a final newline to the downloaded files.

forelabs commented 4 months ago

Hi @dkimmich-onventis, first of all apologize the late reply. We have discussed this internally and created an item for our product research.

For the current state I suggest to trigger a small script that adds the newline when you need it.