Skip to main content

keywords-type

Enabling this rule will result in an error being generated if the value in keywords is not an array.

Example .npmpackagejsonlintrc configuration​

{
"rules": {
"keywords-type": "error"
}
}

Rule Details​

Incorrect example(s)​

{
"keywords": 2
}
{
"keywords": "linter, package"
}
{
"keywords": {
"linter": "true",
"package": "true"
}
}

Correct example(s)​

{
"keywords": ["linter", "package"]
}

History​

  • Introduced in version 0.1.0