Skip to main content

no-repeated-dependencies

Enabling this rule will result in an error being generated if a dependency exists in both dependencies and devDependencies.

Example .npmpackagejsonlintrc configuration

{
"rules": {
"no-repeated-dependencies": "error"
}
}

Rule Details

Incorrect example(s)

{
"dependencies": {
"grunt-npm-package-json-lint": "^0.3.0"
},
"devDependencies": {
"grunt-npm-package-json-lint": "^0.3.0"
}
}

Correct example(s)

{
"dependencies": {
"gulp-npm-package-json-lint": "^0.3.0"
},
"devDependencies": {
"grunt-npm-package-json-lint": "^0.3.0"
}
}

History

  • Introduced in version 4.2.0