Skip to main content

type-type

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

Example .npmpackagejsonlintrc configuration

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

Rule Details

Incorrect example(s)

{
"type": 1
}
{
"type": ["true"]
}
{
"type": true
}
{
"type": {
"enabled": "true"
}
}

Correct example(s)

{
"type": "module"
}

History

  • Introduced in version 7.0.1