Skip to content

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.

{
"private": true,
"files": ["lib"]
}
{
"private": true,
"publishConfig": {
"access": "public"
}
}

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"],
},
});

If your private packages intentionally keep publish-related metadata for internal packing checks or release simulations, you can disable this rule.

Made with ❤️‍🔥 around the world by the Flint team and contributors.