Skip to content

valid-publishConfig

๐Ÿ’ผ This rule is enabled in the following configs: โœ”๏ธ legacy-recommended, โœ… recommended, ๐Ÿ“ฆ recommended-publishable.

This rule does the following checks on the value of the publishConfig property:

  • It must be an object.
  • Each property in the object that maps to an existing package.json property (e.g. exports) must pass the same validations that would be applied to the top-level property
  • For properties that donโ€™t map to other top-level package.json properties (e.g. access), they have their own set of validations that are applied, based on the npm spec

Example of incorrect code for this rule:

{
"publishConfig": {
"provenance": "true"
}
}

Example of correct code for this rule:

{
"publishConfig": {
"provenance": true
}
}