DEV Community

loading...

Discussion on: How to add comments to package.json?

Collapse
tobiassn profile image
Tobias SN

I think you might wanna keep things like this in a separate place, like Github issues, or maybe just some file. But I don’t think package.json is a good place.

Collapse
dandv profile image
Dan Dascalescu

Why do you think package.json is not a good place for comments about things in package.json?

Collapse
tobiassn profile image
Tobias SN

I just feel most people wouldn’t be looking for this kind of information in package.json. But if you wanna put stuff in there then sure go ahead.

Collapse
oscherler profile image
Olivier “Ölbaum” Scherler

It’s the best place: right next (oh, well, as close as possible with a file format that was not made for writing configuration) to where you do the thing. You don’t want anybody (even your future self), to think “Oh, look, someone bumped babel/preset-env to 7.3 but forgot to do the same with babel/core”. And that’s what people are going to think, not “Oh, look, babel/preset-env is on 7.3, but babel/core is on 7.2, let’s walk through all the GitHub issues to see if it’s intentional or not.”

Collapse
napolux profile image
Francesco Napoletano Author

Could be. But having them in the same file makes them super close to the packages and their definitions.

Collapse
tobiassn profile image
Tobias SN

Yeah I guess. Everyone has their own preferences.

Collapse
fuksito profile image
Vitaliy Yanchuk

Agree, I think this is the preference of most people

Forem Open with the Forem app