Unable to find unimported files #41
Comments
I think I'm having similar issues in that it doesn't appear to be recognizing or respecting my aliases. This may be due to a caching issue. Try running
and then re-running unimported. |
@jesseteal After you ran that, did it find your unimported files? |
I had the reverse problem. It wouldn't stop telling me that files were unimported even though they were. I didn't have aliases set up on the first run and it reported 500 unimported files. I added the proper alias but it continued to incorrectly report them. After clearing the cache file it dropped the unimported list to 157. Have you tried changing your aliases to use relative paths? Like:
I think it might be trying to turn your aliases into paths relative to the disk root. So instead of |
@jesseteal are you using 1.12? Do you have the same trouble when 1.11? I see in the screenshot that @dabyland is using 1.11. The cache has been introduced by 1.12. So that can't be the issue. Incorrect mapping of aliases sounds more likely. |
Any chance you can make a small repo @dabyland? |
@smeijer Here is a very basic version of the repo that I was having issues with. I created a couple of files in this one, one of which is imported and the other is not. It doesn't seem to be catching that but again, I'm sure there's something I'm missing here. It is however catching my unused dependencies. |
Figured it out. Thanks for the repo, that helped a lot! So, the first thing in your repo that got me, was having a capital Next, and that's a bug in unimported, you only have a single extension specified in your config under the |
Works like a charm, thanks for all the help and amazing tool! |
Sweet! |
First off, I apologize if this is not the preferred channel of communication for these "issues".
I've got Unimported running through my codebases at this point, properly finding unused dependencies. However I am unable to get it to find my unused files. I've even created new files to see if they will be detected but no luck. All of our files are just
.js
extensions. Before adding thealiases
to my config, I did have unresolved imports, since those issues are fixed I believed it would be able to find my files.Here is what my current config looks like:
.unimportedrc.json
My Output
If there's a more appropriate area or contact for these general questions, please let me know.
Thanks in advance,
Danny
The text was updated successfully, but these errors were encountered: