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
commonjsormodule
Examples
Section titled “Examples”{ "type": "esm"}{ "type": "module"}Related Rules
Section titled “Related Rules”require-type- Enforces that thetypeproperty is present.