Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 544 Bytes

better-alternative.md

File metadata and controls

37 lines (28 loc) · 544 Bytes

better-alternative

Provides a way to ensure that the used dependencies are the preferred ones.

Assuming the rule is used with the following options:

{
  "alternatives": {
    "node-fetch": "axios"
  }
}

**Bad**:

{
  "dependencies": {
    "node-fetch": "~2.6.0"
  }
}

**Good**:

{
  "dependencies": {
    "axios": "~0.21.0"
  }
}

Options

  • alternatives: Record<string, string>: An object containing the to-be replaced packages as keys, and their alternative packages as values.