Feature/max dependencies#489
Conversation
| import Set from 'es6-set' | ||
| import isStaticRequire from '../core/staticRequire' | ||
|
|
||
| const DEFAULT_MAX = 10 |
There was a problem hiding this comment.
I'm not quite sure how defaults are handled. I wanted it so that if you enable the rule, but don't specify {max} option (is that possible?) it would at least default to a sensible 10.
Not sure if that was the right way to go about it... thoughts?
|
Any feedback here @benmosher @jfmengels ? |
|
Sorry for the slow feedback, I think we've both been pretty busy this week and last week. I will do my best to make time Tuesday or Thursday of next week, if @jfmengels hasn't beaten me to it (and @jfmengels: don't worry about it if you're busy too). |
|
Need to add a note in the change log, but beyond that, looks good to me! Thanks! Great docs and tests! @jfmengels, any thoughts/concerns? |
2 similar comments
|
|
||
| Forbid modules to have too many dependencies (`import` or `require` statements). | ||
|
|
||
| This is a useful rule because a module with too many dependencies is code smell, and usually indicates the module is doing too much and/or should be broken up into smaller modules. |
|
Sorry for blocking this! LGTM. Just a doc typo to fix, and the PR needs a rebase. Thanks for this @tizmagik! |
90b1fb5 to
159034c
Compare
|
@jfmengels rebased and ready |
|
LGTM! 😄 |
Closes #486
I decided on naming it
imports/max-dependenciessince it's a bit more generic (also supportsrequire()calls) and less redundant sounding thanimports/max-imports.