Empty objects get split by newline with --pretty-print
, then fails without
#19
Labels
bug
Something isn't working
--pretty-print
, then fails without
#19
Reproduction: https://github.com/swantzter/jsonlint-repro
Hi, we're having an issue where there's inconsistent behaviours between
--pretty-print
and "just" linting when it comes to empty objects.When pretty-print serialises an object it outputs
{\n}
whereas the lint want it to become just{}
Given the above reproduction and test.json:
running
npm run lint:fix
(jsonlint --in-place --pretty-print
) changes the file and outputs the followingRunning
npm run lint
(jsonlint
) after that makes it complain:The text was updated successfully, but these errors were encountered: