Skip to content

valid-files

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

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

  • It must be an array.
  • The array should only consist of non-empty strings
{
"files": "dist/*"
}
  • require-files - Enforces that the files property is present.
  • no-redundant-files - Enforces that the files property of a package.json doesn’t contain any redundant or unnecessary file entries.