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

require.resolve causes invalid package names #859

Open
magnusottosson opened this issue Nov 24, 2023 · 0 comments
Open

require.resolve causes invalid package names #859

magnusottosson opened this issue Nov 24, 2023 · 0 comments
Labels

Comments

@magnusottosson
Copy link

Bug Description

Im extending the xo-typescript eslint config in my eslintrc.js file. In this config it has the following line: parser: require.resolve('@typescript-eslint/parser'). When I run depcheck I get a missing dependency that reports like:

Missing dependencies
* /Users/username/my-path-to-my-module/node_modules/@typescript-eslint/parser/dist/index.js: ./.eslintrc.js

If I manually change the package in node_modules to '@typescript-eslint/parser' it doesnt report the dep as missing any more.

Anyway to handle this (since I cant modify the package)?

Versions

  • node -v: v20.9.0
  • npm -v: 9.8.1
  • depcheck --version: 1.4.7

Extra info

The affecting info from the --json output

"missing": {
    "/Users/username/some-path/my-module/node_modules/@typescript-eslint/parser/dist/index.js": [
      "/Users/username/some-path/my-module/.eslintrc.js"
    ]
  },
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