Skip to main content

license-type

Enabling this rule will result in an error being generated if the value in license is not a string.

Example .npmpackagejsonlintrc configuration

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

Rule Details

Incorrect example(s)

{
"license": 1
}
{
"license": ["MIT"]
}
{
"license": {
"code": "MIT"
}
}

Correct example(s)

{
"license": "MIT"
}

History

  • Introduced in version 0.1.0