Skip to content

publishConfigRedundancy

Reports publishConfig.access fields that do not affect unscoped packages.

✅ This rule is included in the package-json logical presets.

This rule reports publishConfig.access fields in unscoped packages. Unscoped npm packages are always published with public access, so this field only changes publishing behavior for scoped packages.

{
"name": "my-package",
"publishConfig": {
"access": "public"
}
}
{
"name": "my-package",
"publishConfig": {
"access": "restricted",
"registry": "https://registry.npmjs.org/"
}
}

If a package intentionally keeps publishConfig.access as documentation for a future move to a scoped package, this rule might not be for you.

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