deprank icon indicating copy to clipboard operation
deprank copied to clipboard

Index file importing multiple files messes up results

Open ShootingStar91 opened this issue 8 months ago • 0 comments

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?

ShootingStar91 avatar Jun 04 '24 18:06 ShootingStar91