jsonlint
jsonlint copied to clipboard
Windows line endings are changed to Unix line endings
jsonlint -i
changes all Windows line endings (CRLF) to Unix line endings (LF).
Would be nice if it would instead preserve the line endings.
Yes, it could be a nice feature.
However, producing an output with LFs only should not break any parser. JSON parsers on any platform have to accept input, which uses only LF for line breaks according to the specification. Although the operating-system-default line break is represented by CRLF on the particular platform.
Sure it doesn't break anything directly. However when not all files in a project use the same style e.g. copying lines from one file to another can easily lead to mixed line endings, annoying warnings and chaos and confusion in general, so this is best avoided, and using a LINT tool that introduces more such problems than it helps catch seems pointless. ;)