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

Ignoring Flow import type statements when using import/max-dependencies #1136

Closed
Dromin opened this issue Jul 11, 2018 · 2 comments · Fixed by #1847
Closed

Ignoring Flow import type statements when using import/max-dependencies #1136

Dromin opened this issue Jul 11, 2018 · 2 comments · Fixed by #1847

Comments

@Dromin
Copy link

Dromin commented Jul 11, 2018

Currently, Flow import type statements are included in the dependency count when using the import/max-dependencies rule. This makes the rule far less useful for identifying code smells in projects using Flow, especially if you tend to put type defintions in separate files for the rest of the code (which then need separate imports).

I think it would be useful to have an option to ignore import type statements when counting depencencies. Thoughts?

@ljharb
Copy link
Member

ljharb commented Jul 12, 2018

I think they should not be ignored - types are deps too - but perhaps we could add an option that allows you to set a separate count for flow types?

@Dromin
Copy link
Author

Dromin commented Jul 17, 2018

Yeah, that would be better. (And I assume you could use it to ignore type imports if you wanted by setting the max count for those really high.)

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

Successfully merging a pull request may close this issue.

2 participants