Skip to content

repositoryShorthand

Enforces using an object locator for repository.

✅ This rule is included in the package-json preset.

npm used to allow repository values to be provided as string values like this., The npm systems would normalize them to full objects behind-the-scenes on publish., npm no longer allows these kinds of differences between local package.json files and published contents.`,

This rule reports on any legacy repository shorthand string value, and fixes it to the normalized object form.

{
"repository": "flint-fyi/flint"
}

If a package intentionally publishes under a different set of tooling than npm, your tooling may allow or even prefer repository shorthand. In that case this rule may not be for you.

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