Skip to content

repositoryValidity

Enforces that the repository property is valid.

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

This rule checks that the repository property is either an object or a string. If it’s an object, it should have type, url, and optionally directory. If it’s a string, it should be a shorthand repo string from a supported provider.

{
"repository": {
"url": "git+https://github.com/flint-fyi/flint.git"
}
}

If you don’t need compliance with npm’s repository field specification, you can disable this rule. For example, if you use a different package manager that treats the field differently, this rule may not be correct for you.

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