pretty-json icon indicating copy to clipboard operation
pretty-json copied to clipboard

Feature Request: Ensure single newline ending when prettify on save is enabled

Open bradoyler opened this issue 7 years ago • 3 comments

One annoyance I have is that when saving json files it removes the newline ending. Would it be ok to turn off the removal of newline on save?

bradoyler avatar May 04 '17 14:05 bradoyler

Ugh, I also hate when files don't end with a newline. Yuck, even having Atom's whitespace package installed, enabled, and configured to enable Ensure Single Trailing Newline doesn't help.

screen shot 2017-05-04 at 10 15 47 am

I can't work on this right this minute but I'll try to fix it soon. Thanks for the ticket!

lexicalunit avatar May 04 '17 15:05 lexicalunit

Ideally this could come from a .editorconfig file... along with indent size / style and newline style,

jnields avatar Nov 29 '17 18:11 jnields

@jnields there's at least one (maybe more) editorconfig packages for Atom that should, in theory, make this work. Those packages would set Ensure Single Trailing Newline properly, and then the pretty-json package should correctly honor that setting.

lexicalunit avatar Nov 29 '17 19:11 lexicalunit