no-redundant-files
💼 This rule is enabled in the following configs: ✅ recommended, 📦 recommended-publishable.
💡 This rule is manually fixable by editor suggestions.
This rule checks that the files property doesn’t contain any redundant or unnecessary file entries.
By default, npm will automatically include certain files, based on a number of circumstances.
More Details
Section titled “More Details”npm will always include the following files, if present:
package.jsonREADMELICENSE/LICENCE
Additionally, it will include any files that are declared in the main and bin properties.
This rule will check that the files don’t contain any of the above.
It will also check for duplicate entries.
Examples
Section titled “Examples”{ "files": ["README.md", "CHANGELOG.md", "lib/index.js"], "main": "lib/index.js"}{ "files": ["CHANGELOG.md"], "main": "lib/index.js"}Related Rules
Section titled “Related Rules”require-files- Enforces that thefilesproperty is present.valid-files- Enforces that thefilesproperty is valid.