Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reports missing dependency for internal imports #876

Open
chranmat opened this issue Jan 16, 2024 · 0 comments
Open

Reports missing dependency for internal imports #876

chranmat opened this issue Jan 16, 2024 · 0 comments
Labels

Comments

@chranmat
Copy link

Bug Description

When having imports from files in your own source code, DepCheck reports the folder name as a missing dependency:

Missing dependencies
* styles: ./src/styles/constants.ts
* helpers: ./src/hooks/useServerPagination.tsx
* assets: ./src/components/UploadCsv/UploadCsv.tsx
* components: ./src/components/UploadCsv/UploadCsv.tsx
* hooks: ./src/components/DataGrid/DataGrid.tsx

All of the missing dependencies listed above is internal imports.

Code snippets

Where the dependency is used:

import Colors from 'styles/Color.styles';

export const Shadows = {
  cardShadow: `0px 0px 2px ${Colors.shadowGrey}, 0px 16px 32px -4px ${Colors.shadowGrey}`,
  buttonShadow: `0px 8px 16px ${Colors.buttonShadowGrey}`,
};

Where the dependency is listed in package.json:

Dependency is not listed simply because it's a local file "Color.styles.ts" inside the holder "styles".

Versions

  • node -v:
    v20.11.0
  • npm -v:
    10.2.4
  • depcheck --version:
    1.4.7
@chranmat chranmat added the bug label Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant