optionalDependencies-type
Enabling this rule will result in an error being generated if the value in optionalDependencies
is not an object.
Example .npmpackagejsonlintrc configuration
{
"rules": {
"optionalDependencies-type": "error"
}
}
Rule Details
Incorrect example(s)
{
"optionalDependencies": 1
}
{
"optionalDependencies": ["npm-package-json-lint"]
}
{
"optionalDependencies": "npm-package-json-lint"
}
Correct example(s)
{
"optionalDependencies": {
"npm-package-json-lint": "^0.3.0"
}
}
History
- Introduced in version 1.0.0