Skip to content

nameValidity

Enforces that the name property is valid.

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

This rule ensures that the name field is a string matching the npm specification:

{
"name": ""
}
{
"name": null
}
{
"name": "Invalid Name"
}

If you don’t need compliance with npm’s name field specification, you can disable this rule. For example, if you use a different package manager that treats the field differently, this rule may not be correct for you.

  • namePresence - Enforces that the name property is present.
Made with ❤️‍🔥 around the world by the Flint team and contributors.