Skip to main content

version-type

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

Example .npmpackagejsonlintrc configuration

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

Rule Details

Incorrect example(s)

{
"version": 1.0
}
{
"version": ["1.0.0"]
}
{
"version": {
"stable": "1.0.0"
}
}

Correct example(s)

{
"version": "1.0.0"
}

History

  • Introduced in version 0.1.0