-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Feature/max dependencies #489
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
import Set from 'es6-set' | ||
import isStaticRequire from '../core/staticRequire' | ||
|
||
const DEFAULT_MAX = 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is A code smell
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-dependencies
since it's a bit more generic (also supportsrequire()
calls) and less redundant sounding thanimports/max-imports
.