Skip to content

Latest commit

 

History

History
40 lines (31 loc) · 488 Bytes

duplicate-dependencies.md

File metadata and controls

40 lines (31 loc) · 488 Bytes

duplicate-dependencies

Asserts dependencies are only defined once.

**Bad**:

{
  "dependencies": {
    "lodash": "^4.17.0"
  },
  "devDependencies": {
    "lodash": "^4.17.0"
  }
}

**Good**:

{
  "dependencies": {
    "lodash": "~4.17.0"
  }
}

**Also Good**: (depends on the use case)

{
  "devDependencies": {
    "lodash": "4.17.0"
  }
}

Options

  • exclude: string[]: A list of dependencies this rule will ignore.