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.
{
"rules": {
"valid-values-license": ["error", [
"private",
"unlicensed"
]]
}
}
{
"license": "MIT"
}
{
"license": "private"
}
{
"license": "unlicensed"
}
{
"rules": {
"valid-values-license": "off"
}
}
- Introduced in version 1.4.0