When you’re bored, you usually have your best ideas. While wasting some time on twitter this morning I met a legit question coming from @caludio (you should really follow him):
Are there any plans to make it possible for package.json to contain comments? I can understand the implications but i.e., I would like to write the reason why I had to lock a package to a specific version (hello, TypeScript)— Claudio Cicali 🇪🇺 (@caludio) 15 febbraio 2019
And I was a bit confused… It’s a JSON, I can do whatever I want with it! So I’ve put together some code just to run an
npm install on it…
It works! It’s not the best possible solution, for sure no inline comments for example, but if you maintain the structure of your
comments section very close to the one of
package.json it will be definetely readable!