Skip to content

Latest commit

 

History

History
55 lines (43 loc) · 949 Bytes

no-restricted-dependencies.md

File metadata and controls

55 lines (43 loc) · 949 Bytes
id title
no-restricted-dependencies
no-restricted-dependencies

Enabling this rule will result in an error being generated if one of the dependencies in dependencies is equal to one of the values in the array of restricted dependencies.

Example .npmpackagejsonlintrc configuration

{
  "rules": {
    "no-restricted-dependencies": ["error", [
      "grunt-npm-package-json-lint"
    ]]
  }
}

Rule Details

Incorrect example(s)

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

Correct example(s)

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

Shorthand for disabling the rule in .npmpackagejsonlintrc configuration

{
  "rules": {
    "no-restricted-dependencies": "off"
  }
}

History

  • Renamed from dependencies-invalid-dependencies to no-restricted-dependencies in version 1.0.0
  • Introduced in version 0.1.0