Open abirmingham opened 5 years ago
Thanks for sharing the nice code. I am happy with the result
I had
a.js -> b.js -> a.js
and
b.js -> a.js -> b.js
and now I have
b.js -> a.js -> b.js
only for example.
But had some curiosity.
I think [...paths.slice(1), paths[1]]
this is same in the for loop.
so I tried
for (let i = 0; i < 2; i++) {
and had the same result.
I think you I meant
[...paths.slice(i + 1), ...paths.slice(1, i + 1), paths[i + 1]]
it has same result for my case though.
BTW, still curious why this package had to return the repeating item. from the first place. not sure if it could have added the first item when it generates the error message
Hello!
I'm seeing detections which I would consider to be duplicates.
Imagine that I have
a.ts
andb.ts
and they import from one another, creating a circular dependency. In this case I would expect a single detection likea.ts -> b.ts -> a.ts
, but instead I seea.ts -> b.ts -> a.ts
andb.ts -> a.ts -> b.ts
.This is easy enough to work around with custom configuration, and I will include mine at the bottom of this message, but I'm wondering if the tool itself should dedupe these? Happy to create an MR if I'm pointed in the right direction. Thanks!
My Dedupe Config: