Hey π
Internal write-json-file
has a detectIndent option to detect indentation of existing file which is false
by default. write-pkg
provides this option which is hardcoded to true
.
If existing file has empty {}
contents inside, added fields will be saved as a single line:
{"name":"test","version":"1.0.0"}
It's impossible to fix such file indentation using any indentation options, the only way is to remove file and regenerate it. It would be nice to have detectIndent
not hardcoded and have possibility to overwrite it.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too