Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing documentation around about valid-values-license and require-license #221

Open
spicq-rambobafet opened this issue Mar 19, 2020 · 1 comment
Labels
question ❔ Further information is requested

Comments

@spicq-rambobafet
Copy link

Hi :)
Not sure if that it's a bug, but i'm pretty sure that I'm, at least, missing a point and I would need clarification about 2 rules because I find the documentation confusing:

If I declare MIT I get error: Invalid value for license. No warning.
If I declare private I get error: valid-values-license - node: license - Invalid value for license. warning package.json: License should be a valid SPDX license expression.

The configuration is the one by default offered by Wordpress script.

Versions:

- node v12.16.1
- @wordpress/scripts: "^7.0.0",
- (peer) npm-package-json-lint: ">=3.6.0"

I can disable the rule, but I'd like to understand what's expected here. :)
Thanks for your time, and stay safe.

Bob

@tclindner tclindner added the question ❔ Further information is requested label Apr 12, 2020
@tclindner
Copy link
Owner

Hey Bob! Sorry that the docs are confusing!

  • require-license enforces that the license field is present and of the right type (i.e. String). It doesn't enforce a specific license.
  • valid-values-license checks the value set in the license field against the list of approved licenses set in the config. The WordPress team have 'valid-values-license': [ 'error', [ 'GPL-2.0-or-later' ] ], configured. You can see it here. You will need to set license to GPL-2.0-or-later for WordPress packages.

Do you have any recommendations for how to improve the docs to make it more clear?

P.S. Sorry for the delayed response. Please let me know if this helps resolve your question! 🤞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question ❔ Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants