normalize-pkg icon indicating copy to clipboard operation
normalize-pkg copied to clipboard

Integrate package.json validator output?

Open pdehaan opened this issue 10 years ago • 2 comments

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

pdehaan avatar Mar 29 '14 21:03 pdehaan

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?

jonschlinkert avatar Mar 29 '14 21:03 jonschlinkert

(╯°□°)╯︵ ┻━┻

Sure, sounds fine. As long as npm accepts the package.json, it's all good.

pdehaan avatar Mar 29 '14 22:03 pdehaan