-
Notifications
You must be signed in to change notification settings - Fork 15
Doesn't detect any unused files even though there are several #1
Comments
Thanks for the reproduction @Vadorequest 🙏 I'm debugging to make this package more reliable. Just ran on your repo and found these files:
Does that seem accurate? |
Awesome! And yes, it looks very accurate. I'll need to tweak the config to ignore |
Great! Published a new version. Keep in mind you don't want to include UnlyEd/next-right-now@16da46e#diff-b9cfc7f2cdf78a7f4b91a753d10865a2R69 |
Thanks! I'll try it out quickly. Yeah, I tried to tweak the entrypoints because I wasn't getting any result, but indeed I'll remove it, good catch! |
I've upgraded to "next-unused": {
"alias": {},
"debug": true,
"include": [
"src/components",
"src/gql",
"src/hocs",
"src/hooks",
"src/middlewares",
"src/mocks",
"src/pages",
"src/propTypes",
"src/stores",
"src/types",
"src/utils"
],
"exclude": [],
"entrypoints": [
"src/pages"
]
},
It seems to be looking for a
|
@pacocoursey Do you know if I misconfigured anything here? Is there a workaround? |
I didn't account for monorepos in which |
This should be fixed in |
Here is the new output:
There is a lot of noise coming through
Otherwise, it seems to work great! Would love to silent unused tests files though, they're all false positives since they're never imported from anywhere and that's expected. |
I was trying to think of a good syntax for excludes. Right now, it's a very plain Regex, so:
Should ignore any files that include the literal string I suppose the wildcard syntax is more natural though, I'll look into supporting that instead |
Thanks! Regex is fine, adding an example for a common use case such as test files in the readme would be a good example though! Worked like a charm. |
I just tried the lib and it doesn't work. I'm using TS and .tsx files m(aybe that's related?)
Commit: UnlyEd/next-right-now@16da46e
Branch: https://github.com/UnlyEd/next-right-now/tree/analyse
Reproduce
git clone https://github.com/UnlyEd/next-right-now.git nrn-quick-start
cd nrn-quick-start && git checkout analyse
yarn
yarn analyze:unused
Unused files:
Amongst many others
The text was updated successfully, but these errors were encountered: