4 ms·
Just do { "someSetting": true "comment": "TODO change to false when ready" } Though really text-based protobufs are better for config.
by hot_gril 4y ago
Just do
{
"someSetting": true
"comment": "TODO change to false when ready"
}
Though really text-based protobufs are better for config.
- sixbrx 4y agoProblems are that some tools will rewrite the file and reorder the "comment" away from what it's meant to comment on. Also might complain the "comment" item isn't expected there. I seem to remember package.json suffering from both of these under the control of npm.
- hot_gril 4y agoYeah it's definitely a limited solution, and I prefer that JSON be kept simple that way. Many package.json-adjacent configs like the Babel stuff can be in .js files, giving you comments and everything.