valid-values-private
Enabling this rule will result in an error being generated if the value in private
is not equal to one of the values in the array of valid values.
Example .npmpackagejsonlintrc configuration
{
"rules": {
"valid-values-private": ["error", [
false
]]
}
}
Rule Details
Incorrect example(s)
{
"private": true
}
Correct example(s)
{
"private": false
}
Example .npmpackagejsonlintrc configuration
{
"private": [
false,
true
]
}
Rule Details
Incorrect example(s)
N/A
Correct example(s)
{
"private": false
}
{
"private": true
}
Shorthand for disabling the rule in .npmpackagejsonlintrc configuration
{
"rules": {
"valid-values-private": "off"
}
}
History
- Improved messaging when an invalid configuration is detected in version 6.1.0
- Renamed from private-valid-values to valid-values-private in version 1.0.0
- Introduced in version 0.1.0