💼 This rule is enabled in the ✅ recommended
config.
🔧 This rule is automatically fixable by the --fix
CLI option.
This rule enforces that repository
entries in a package.json
use shorthand notation to refer to GitHub repositories when possible.
Instead of specifying a full URL like "https://github.com/JoshuaKGoldberg/eslint-plugin-package-json"
, the shorthand "JoshuaKGoldberg/eslint-plugin-package-json"
is equivalent and more succinct.
Examples of incorrect code for this rule:
{
"repository": {
"type": "git",
"url": "https://github.com/JoshuaKGoldberg/create-typescript-app"
}
}
Examples of correct code for this rule:
{
"repository": "JoshuaKGoldberg/create-typescript-app"
}