normalize-pkg
normalize-pkg copied to clipboard
Integrate package.json validator output?
Since this alters the package.json file quite a bit in some cases, not sure if you want to add some more debug output after rewriting the package.json file.
Relevant: https://github.com/gorillamania/package.json-validator
For example, after rewriting the package.json file, maybe just a brief few lines of output saying:
package.json file valid: false errors:
- bugs field should have one of: email, url, mail, web
- licenses field should have url
- author field should have name
Not a bad idea. After you pointed the validator out initially it had crossed my mind, but I dismissed because (ahem) I didn't want some of the fields to be "technically" valid lol. Sorry, just being honest. I don't like the idea of encouraging the use of strings on some of the fields. However! If we implement "modes", we can have a strict mode that makes everyone happy.
Sound okay?
(╯°□°)╯︵ ┻━┻
Sure, sounds fine. As long as npm accepts the package.json, it's all good.