Unable to find unimported files
See original GitHub issueFirst 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 the aliases
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
{
"entry": ["apps/manager/src/index.js"],
"extensions": [".js"],
"ignorePatterns": ["**/node_modules/**"],
"ignoreUnresolved": ["some-npm-dependency"],
"ignoreUnimported": ["src/i18n/locales/en.ts", "src/i18n/locales/nl.ts"],
"ignoreUnused": ["create-emotion", "unimported"],
"aliases": {
"~/*": ["apps/manager/src/*"],
"Lib/*": ["lib/node/src/*"],
"ROOT": ["./../../*"]
}
}
My Output
If there’s a more appropriate area or contact for these general questions, please let me know.
Thanks in advance, Danny
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Works like a charm, thanks for all the help and amazing tool!
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
I
in the filename ofIndex.js
, while it’s namedindex.js
in an entry file in the config.Next, and that’s a bug in unimported, you only have a single extension specified in your config under the
extensions
property. I’m going to push a fix soon. In the mean while, you can check by just adding another extension there as well ([".js", ".ts"]
for example).