Skip to main content

no-file-peerDependencies

Enabling this rule will result in an error being generated if one of the peerDependencies in peerDependencies is url to local file.

Example .npmpackagejsonlintrc configuration​

{
"rules": {
"no-file-peerDependencies": "error"
}
}

With exceptions

{
"rules": {
"no-file-peerDependencies": ["error", {
"exceptions": ["myModule"]
}]
}
}

Rule Details​

Incorrect examples​

{
"peerDependencies": {
"my-module": "file:local-module"
}
}

Correct examples​

{
"peerDependencies": {
"gulp-npm-package-json-lint": "miripiruni/grunt-npm-package-json-lint"
}
}

Shorthand for disabling the rule in .npmpackagejsonlintrc configuration​

{
"rules": {
"no-file-peerDependencies": "off"
}
}

History​

  • Introduced in version 10.1.0