Skip to content

Latest commit

 

History

History
57 lines (44 loc) · 754 Bytes

valid-values-license.md

File metadata and controls

57 lines (44 loc) · 754 Bytes
id title
valid-values-license
valid-values-license

Enabling this rule will result in an error being generated if the value in license is not equal to one of the values in the array of valid values.

Example .npmpackagejsonlintrc configuration

{
  "rules": {
    "valid-values-license": ["error", [
      "private",
      "unlicensed"
     ]]
  }
}

Rule Details

Incorrect example(s)

{
  "license": "MIT"
}

Correct example(s)

{
  "license": "private"
}
{
  "license": "unlicensed"
}

Shorthand for disabling the rule in .npmpackagejsonlintrc configuration

{
  "rules": {
    "valid-values-license": "off"
  }
}

History

  • Introduced in version 1.4.0