danger-plugin-duplicate-packages

This is a Danger Plugin that allows checking for multiple copies of packages in the dependency tree.

Usage no npm install needed!

<script type="module">
  import dangerPluginDuplicatePackages from 'https://cdn.skypack.dev/danger-plugin-duplicate-packages';
</script>

README

danger-plugin-duplicate-packages

This danger plugin can be used to check for duplicates of specific packages and throw a failure if it finds any. This has a few different use cases, such as fighting bundle size, or ensuring only one copy react is loaded at a time.

Installation

yarn add danger-plugin-duplicate-packages -D

Usage

Simply add this to your Dangerfile:

import { checkDuplicatePackages } from 'danger-plugin-duplicate-packages'

checkDuplicatePackages({
  packageNames: ["react-native"]
})

And checkDuplicatePackages will output an error if it finds multiple copies of react-native

Contributing

See CONTRIBUTING.md.