After experimenting with import/no-unused-modules on a project, we found that it suffers from several issues:
It is exceedingly slow. In our test project, linting time increased by 15-20x. There is an open issue about this. A mitigating PR has been merged, but not yet released.
After experimenting with
import/no-unused-modules
on a project, we found that it suffers from several issues:It is exceedingly slow. In our test project, linting time increased by 15-20x. There is an open issue about this. A mitigating PR has been merged, but not yet released.
There are too many false postives. It reports every single Jest test file and doesn't recognize
module.exports
.It doesn't support using globs for ignoring files (see https://github.com/benmosher/eslint-plugin-import/issues/1452 and https://github.com/benmosher/eslint-plugin-import/issues/1326). If it did, we could more easily tell it to ignore our test files.
Until these issues are resolved upstream, we should keep this rule turned off.