Skip to main content

repository-type

Enabling this rule will result in an error being generated if the value in repository is not either a string nor an object.

Example .npmpackagejsonlintrc configuration

{
"rules": {
"repository-type": "error"
}
}

Rule Details

Incorrect example(s)

{
"repository": 1
}
{
"repository": ["https://github.com/tclindner/npm-package-json-lint.git"]
}

Correct example(s)

{
"repository": "tclindner/npm-package-json-lint"
}
{
"repository": {
"type": "git",
"url": "https://github.com/tclindner/npm-package-json-lint.git"
}
}

History

  • Introduced in version 0.1.0