codemix / codemix/deprank

Index file importing multiple files messes up results

Open
#7 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
889
Forks
23
PR merge metrics
No merged PRs in 30d

Description

I'm using sequelize and I have a `models/index.js` which does this:

```
import { Car } from './car.js'
import { Bike } from './bike.js'

// ... defining sequelize relations here ..

// then:

module.exports = {
Car, Bike
}
```

Then if another file `vehicularMadness.js` imports Car via this index file, also bike.js gets calculated as imported by `vehicularMadness.js`. And in fact all files that `module/index.js` imports get assigned the same usage.

Is there a way to configure deprank to not work like this or is there another tool that does not do this?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.