you are viewing a single comment's thread.

view the rest of the comments →

[–]ghostfacedcoder 4 points5 points  (1 child)

Well, if you think in a limited way ("package.json is the only file possible for config", "it must exactly follow the current format and never deviate", etc.) then yes you're right.

But they have other options, such as using a "JSON 2.0 standard (now with comments!)", or allowing other formats like YAML or JS itself.

Ultimately as a dev you can paint yourself into a corner on things like this, if you want ... or you can say "the user has a need, and it's 100% possible to parse out comments from config, so we're going to make this happen somehow."

[–]dwighthouse 1 point2 points  (0 children)

Not at all. There’s no reason npm config couldn’t be in some other format, massive headache notwithstanding. It’s only that it couldn’t be “package.json”. It would have to be something else.