privatePackageProperties
Reports package.json properties that do not apply to private packages.
✅ This rule is included in the package-json preset.
This rule reports package properties that are unnecessary when private is true.
Private packages cannot be published to npm, so publication metadata such as files and publishConfig does not apply.
Examples
Section titled “Examples”{ "private": true, "files": ["lib"]}{ "private": true, "publishConfig": { "access": "public" }}{ "private": true}{ "private": false, "files": ["lib"], "publishConfig": { "access": "public" }}Options
Section titled “Options”blockedProperties
Section titled “blockedProperties”Type:
string[]Default:
["files", "publishConfig"]
Package properties to report when private is true.
Configured values replace the default list.
any
packageJson.any
rules({ privatePackageProperties: { blockedProperties: string[];}
privatePackageProperties: { blockedProperties: string[]
blockedProperties: ["files", "publishConfig", "sideEffects"], },});When Not To Use It
Section titled “When Not To Use It”If your private packages intentionally keep publish-related metadata for internal packing checks or release simulations, you can disable this rule.
Further Reading
Section titled “Further Reading”Equivalents in Other Linters
Section titled “Equivalents in Other Linters”
Made with ❤️🔥 around the world by
the Flint team and contributors.