Skip to main content

require-repository-directory

Enabling this rule will result in an error being generated if repository.directory is missing from the package.json file.

Example .npmpackagejsonlintrc configuration

{
"rules": {
"require-repository-directory": "error"
}
}

Rule Details

Incorrect example(s)

{

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

Correct example(s)

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

History

  • Introduced in version 3.6.0