Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rule] Implement big dependencies rule #2

Open
iranreyes opened this issue Aug 22, 2019 · 1 comment
Open

[Rule] Implement big dependencies rule #2

iranreyes opened this issue Aug 22, 2019 · 1 comment
Assignees

Comments

@iranreyes
Copy link
Member

iranreyes commented Aug 22, 2019

Idea

Create a rule that checks the file size of npm dependencies and alerts if there are dependencies with a bigger size than the one specified in the adviser configuration file.

Rule Specifications

Name: package-size
Arguments: threshold, whitelist

Implementation

  1. Find how to calculate package-sizes (for the browser) in the best way (performance and accurately)
  2. Implement it on the rule

package-size

  1. Try to find an npm package that does it
  2. If doesn't exist, review how bundlephobia, import-cost, bundlesize are doing it
  3. If it's hard to reproduce it, use one of the previous ones (bundlephobia API - https://bundlephobia.com/api/size?package=adviser)

Notes

Create documentation for the rule within /docs/rules
Add metadata to the rule
Update the Plugin general README and add the new rule

@iranreyes iranreyes assigned iranreyes and unassigned iranreyes Aug 22, 2019
@colinmaclachlan colinmaclachlan self-assigned this Sep 4, 2019
@iranreyes
Copy link
Member Author

@colinmaclachlan There are security vulnerabilities with the dependencies of this rule

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants