Skip to main content

version-format

Enabling this rule will result in an error being generated if version is not a valid semantic version.

Example .npmpackagejsonlintrc configuration

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

Rule Details

Incorrect example(s)

{
"version": 1.0
}
{
"version": "1.a.0"
}

Correct example(s)

{
"version": "1.0.0"
}

Resources

History

  • Introduced in version 1.0.0