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

Ignore // #862

Open
alexeyr-ci opened this issue Dec 9, 2023 · 0 comments
Open

Ignore // #862

alexeyr-ci opened this issue Dec 9, 2023 · 0 comments
Labels

Comments

@alexeyr-ci
Copy link
Contributor

Bug Description

The officially suggested solution for comments in package.json is using // as a key (https://groups.google.com/g/nodejs/c/NmL7jdeuw0M/m/yTqI05DRQrIJ, npm/npm#4482 (comment)):

... the "//" key will never be used by npm for any purpose, and is reserved for comments ... If you want to use a multiple line comment, you can use either an array, or multiple "//" keys.

depcheck reasonably thinks it's a dependency called // and reports it as unused.

Code snippets

Where the dependency is used:

It isn't

Where the dependency is listed in package.json:

"//": ["a comment"],

Versions

  • node -v: v18.17.0
  • npm -v: 9.6.7
  • depcheck --version: 1.4.7

Extra info

Any extra info you want to include. Thank you for the bug report!

BONUS POINTS: If you wish to help us debug further, the depcheck --json option will show more information. Check here in the README for documentation on json output.

@alexeyr-ci alexeyr-ci added the bug label Dec 9, 2023
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