Skip to content

valid-type

💼 This rule is enabled in the following configs: ✅ recommended, 📦 recommended-publishable.

This rule uses package-json-validator to validate the type property, if present, against the following criteria:

  • It must be a string
  • The value must be either commonjs or module
{
"type": "esm"
}
  • require-type - Enforces that the type property is present.