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

New rule idea: "no-unused-modules" #361

Closed
torarnek opened this issue May 31, 2016 · 1 comment
Closed

New rule idea: "no-unused-modules" #361

torarnek opened this issue May 31, 2016 · 1 comment

Comments

@torarnek
Copy link

Problem: In larger projects unused modules tend to lay around, and it is tiresome to find these modules (for deletion). It would be nice enforce/warn about unused modules.

As the resolving needs a starting point we can provide a regexp. In my current project we have two ways to express entries, either simply being a file in /pages/, or having Init.js extension, e.g. ProfileInit.js

import/no-unused-modules: [2, { entry: /Init\.js$|\/pages\// }]

Any files that not imported recursively can listet.

I would love this feature! :)

@torarnek torarnek changed the title New rule "no-unused-modules" New rule idea "no-unused-modules" May 31, 2016
@torarnek torarnek changed the title New rule idea "no-unused-modules" New rule idea: "no-unused-modules" May 31, 2016
@benmosher
Copy link
Member

closing as dupe of #186. I agree, would be super-cool 😎

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

No branches or pull requests

2 participants