filesRedundancy
Reports package.json
filesentries that npm already includes.
✅ This rule is included in the package-json logical presets.
This rule reports entries in files that npm includes automatically.
npm always includes package.json, root-level README, COPYING, LICENSE, and LICENCE files, the file declared in main, and files declared in bin.
It also reports duplicate files entries.
Examples
Section titled “Examples”{ "files": ["README.md", "dist/"]}{ "main": "./lib/index.js", "files": ["lib/index.js", "dist/"]}{ "files": ["dist/", "dist/"]}{ "files": ["CHANGELOG.md", "dist/"]}{ "main": "./lib/index.js", "files": ["dist/"]}When Not To Use It
Section titled “When Not To Use It”If a package uses a custom publishing tool that does not follow npm's automatic package-file inclusion rules, this rule might not apply. For example, another tool might require README or entry-point files to be listed explicitly.
Further Reading
Section titled “Further Reading”Equivalents in Other Linters
Section titled “Equivalents in Other Linters”- ESLint:
package-json/no-redundant-files
Made with ❤️🔥 around the world by
the Flint team and contributors.