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.
Examples
Section titled “Examples”{ "repository": "flint-fyi/flint"}{ "repository": { "type": "git", "url": "https://github.com/flint-fyi/flint" }}When Not To Use It
Section titled “When Not To Use It”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.