I have this issue, and whenever I do
When npm creates and updates the files, it rewrites the line endings to unix-style
LF whereas windows endings are
CRLF. When using an editor that doesn't handle unix endings correctly, you will see the whole content in one line.
So: use an editor that can handle unix line endings correctly.