valid-values-name-scope
Enabling this rule will result in an error being generated if the package name
does not have a scope set to one of the values in the array of valid values.
Example .npmpackagejsonlintrc configuration
{
"rules": {
"valid-values-name-scope": ["error", [
"@lerna",
"@babel"
]]
}
}
Rule Details
Incorrect example(s)
{
"name": "@awesome/my-program"
}
{
"name": "my-program"
}
Correct example(s)
{
"name": "@lerna/my-program"
}
{
"name": "@babel/my-program"
}
Shorthand for disabling the rule in .npmpackagejsonlintrc configuration
{
"rules": {
"valid-values-name-scope": "off"
}
}
History
- Improved messaging when an invalid configuration is detected in version 6.1.0
- Introduced in version 3.4.0