eslint-plugin-import
eslint-plugin-import copied to clipboard
[Suggestion] Option `ignoreImports` for `import/no-unused-modules`
I'm currently using the rule import/no-unused-modules to find dead code and eliminate it.
In my current stack, I'm using Storybook to document my components.
I can remove the warnings of the unused imports of my story with the ignoreExports option of the import/no-unused-modules.
My problem today is that I have some components that are not used in my app anymore, but since they are required in stories, they are not flagged in the import/no-unused-modules.
My wish would be to have an ignoreImports option in that rule, that would "remove" the files in it from the list of files that would import a module, in a way in which my unused components would be flagged as unused modules.
Cheers 🍻