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
Examples
Section titled “Examples”{ "files": "dist/*"}{ "files": ["CHANGELOG.md", "dist/"]}Related Rules
Section titled “Related Rules”require-files- Enforces that thefilesproperty is present.no-redundant-files- Enforces that thefilesproperty of apackage.jsondoesn’t contain any redundant or unnecessary file entries.