You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
require-license says that the correct value of license is MIT.
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.
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! 🤞
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:
license
isMIT
.license
isMIT
.If I declare
MIT
I geterror: Invalid value for license
. No warning.If I declare
private
I geterror: 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:
I can disable the rule, but I'd like to understand what's expected here. :)
Thanks for your time, and stay safe.
Bob
The text was updated successfully, but these errors were encountered: