Skip to content

versionPresence

Enforces that the version property is present.

✅ This rule is included in the package-json logical presets.

This rule checks that the version property is present.

{}
{
"name": "my-repository"
}

Whether the property should still be required when the package’s private property is true. Defaults to true.

This option can be useful if the rule is enabled on many package.json files and some files differ in privacy.

If your package doesn’t need to specify a version, you can disable this rule. For example, if your package is local-only and is never published online or made open source, versioning may not be relevant for you.

Made with ❤️‍🔥 around the world by the Flint team and contributors.