Hacker News new | ask | show | jobs
by hot_gril 1168 days ago
Just do

  {
    "someSetting": true
    "comment": "TODO change to false when ready"
  }
Though really text-based protobufs are better for config.
1 comments

Problems 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.
Yeah 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.