Skip to content

valid-exports

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

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

  • It should be of type string or object.
  • If it’s a string, it should be a path to an entry point.
  • If it’s an export condition object, its properties should have values that are either a path to an entry point, or another exports condition object.
{
"exports": {
"import": true
}
}