1import { Product } from "../../state/interfaces/"; 2import Link from "next/link";
3export default function ProductCard({
4 product,
Unnecessarily complex import statements can be simplified. Complex imports usually result in confusing code. This usually happens as a result of refactoring.
For the following project structure
├── root.config.js
├── .deepsource.toml
└── calculator
├── index.js
├── calc.js
└── config.js
└── utils
└── pofyfills.js
└── index.js
// <!-- calcuator/index.js -->
import utils from './utils/index.js' // unnecessary to mentioned `index.js` at the end. NodeJS always resolves using index.js
import config from './../root.config.js' // unnecessary to add the `./`/
import polyfills from './utils//polyfills.js' // unnecessary to add the extra `/` before `polyfills.js`
import { processUtils } from './utils/' // unnecessary to add the extra `/` after `./utils`
// <!-- calcuator/index.js -->
import utils from './utils'
import config from '../root.config.js' // unnecessary to add the `./`/
import polyfills from './utils/polyfills.js' // unnecessary to add the extra `/` before `polyfills.js`
import { processUtils } from './utils' // unnecessary to add the extra `/` after `./utils`