plugin-invalid-version
Plugin version must follow semantic versioning format
Rule Details
This rule checks that the version field in plugin.json conforms to the Semantic Versioning (semver) specification. Valid formats include major.minor.patch (e.g., 1.0.0), optional pre-release identifiers (e.g., 2.1.0-beta.1), and optional build metadata (e.g., 1.0.0+build.42). Proper semver ensures consistent dependency resolution and clear communication about breaking changes.
Incorrect
Version missing the patch number
{
"name": "my-plugin",
"version": "1.0",
"description": "A sample plugin"
}Version with a leading v prefix
{
"name": "my-plugin",
"version": "v2.1.0",
"description": "A sample plugin"
}Correct
Standard semver version
{
"name": "my-plugin",
"version": "1.0.0",
"description": "A sample plugin"
}Pre-release version
{
"name": "my-plugin",
"version": "2.1.0-beta.1",
"description": "A sample plugin"
}How To Fix
Update the version field to follow the semver format: MAJOR.MINOR.PATCH. Optionally append a pre-release identifier with a hyphen (e.g., 1.0.0-beta) or build metadata with a plus sign (e.g., 1.0.0+build.1).
Options
This rule does not have any configuration options.
Related Rules
Resources
Version
Available since: v0.2.0